collectFreeParamNames

Returns the free identifiers anywhere in an environment's attribute values, sorted: the letters it may offer the reader as parameters.

@internote/canvas-sdkFunction
On this page
import { collectFreeParamNames } from '@internote/canvas-sdk';

Walks the body flattened, so a letter written inside a cue is found; the host decides whether a control for it should be shown yet. What a definition's freeParameters is written with.

#Signature

(
    children: CompiledNode[],
    categorical?: Partial<Record<string, boolean>>,
    scope?: FreeParamScope,
): string[]

#Parameters

children
The environment's children, as childNodes(ctx.node.body) returns them.
categorical
Which axis names are ruled in categories, so a name written on one is not read as letters.
scope
The environment's own facts about which attributes are names and which bind their own variables.

#Example

freeParameters: (ctx) => collectFreeParamNames(childNodes(ctx.node.body), {}, { onAxis: new Set(['point']) }),

Declared in packages/canvas-sdk/src/parameters/free-names.ts:61.

Last updated