elementSet.nodes

The set naming graph nodes by id.

Value helperSince 0.3.0

Usage

TypeScript
ElementSet.nodes(ids: readonly string[], at?: Omit<Scope, 'node'>): ElementSet

Parameters

  • idsreadonly string[]

    Graph node ids.

    Required

  • atOmit<Scope, 'node'>

    The revision the graph elements belong to; omit for the current graph. Default {}.

Returns

{...at, kind: 'node', nodes: ids }; an empty list names nothing.

Example

TypeScript
ElementSet.nodes(['box1', 'xform2']).nodes // → ['box1', 'xform2']

See also