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-sdkOn 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
attributesThe node's attributes, each with its canonical name and compiled value.
ReadonlyArray<{ identifier: string; value: unknown }>bodyThe compiled contents of the node's
{…} section: child nodes, inline content or a typed value.unknowndetailThe compiled contents of the node's
[…] section: child nodes or inline content.unknownidThe
#id the author gave the node, if any. Read it with nodeId.unknownidentifierThe node's type as written, such as
graph, point or cue.stringinstance_idThe id the system gives every node, kept across edits. An author cannot write or reference it.
unknownDeclared in packages/canvas-sdk/src/environment/nodes.ts:29.