NodeLike

The fields of a compiled node that the node helpers read, so the same helpers work on render-time nodes and on the compiler's own elements.

@internote/canvas-sdkInterface
On this page
import { NodeLike } from '@internote/canvas-sdk';

The helpers are generic over it, so a validator running on a compiled document and a surface running on a mounted node ask the same question the same way, and each gets back the node type it passed in.

#Fields

attributes
The node's attributes, each with its canonical name and compiled value.
ReadonlyArray<{ identifier: string; value: unknown }>
body
The compiled contents of the node's {…} section: child nodes, inline content or a typed value.
unknown
detail
The compiled contents of the node's […] section: child nodes or inline content.
unknown
id
The #id the author gave the node, if any. Read it with nodeId.
unknown
identifierRequired
The node's type as written, such as graph, point or cue.
string
instance_id
The id the system gives every node, kept across edits. An author cannot write or reference it.
unknown

Declared in packages/canvas-sdk/src/environment/nodes.ts:29.

Last updated