Doc > API > BaseNode

Doc > API > BaseNode

TypedNode is the base class that all nodes inherit from. This inherits from CoreGraphNode.



sets the name of a node. Note that if a sibling node already has that name, it will be updated to be unique.


returns the type of the node.

.context(): NodeContext

returns the context.


returns the parent.

.path(relative_to_parent?: BaseNodeType): string

returns the path.

.onCookEnd(callbackName: string, callback: OnCookCompleteHook)

registers a callback that will be run every time the node finishes cooking.


returns a promise that will be resolved when the node finishes cooking.

.createNode(nodeClass: any, options?: NodeCreateOptions)

create a node.

.removeNode(node: BaseNodeType)

removes a child node


returns the list of children

.node(path: string)

returns a child node

.nodeSibling(name: string): BaseNodeByContextMap[NC] | null

returns a sibling node

.nodesByType(type: string)

returns the children matching the type

.setInput( inputIndexOrName: number | string, node: BaseNodeByContextMap[NC] | null, outputIndexOrName?: number | string, options?: SetInputsOptions )

sets a node as input