workflow.basenode.md

February 13, 2024 ยท View on GitHub

Home > @datashaper/workflow > BaseNode

BaseNode class

Signature:

export declare abstract class BaseNode<T, Config> implements Node<T, Config> 

Implements: Node<T, Config>

Constructors

ConstructorModifiersDescription
(constructor)(inputs, outputs)Creates a new instance of the BaseNode

Properties

PropertyModifiersTypeDescription
_inputsprotectedSocketName[]
_outputsprotectedSocketName[]
bindingsreadonlyNodeBinding<T>[]
bindings$readonlyObservable<NodeBinding<T>[]>
configMaybe<Config>
config$readonlyObservable<Maybe<Config>>
emitprotected(value: Maybe<T>, socketName?: SocketName) => voidEmits a new value into the named output socket
emitErrorprotected(error: unknown, socketName?: SocketName) => voidEmits a downstream error
idNodeId
inputsSocketName[]
isBindingRequired

protected

readonly

booleanIf 'isBindingRequired' is true (the default), then config-changes will not drive recomputes if no input bindings are present.
outputsSocketName[]
recalculateprotected(cause: string) => voidCalculate the value of this processing node. This may be invoked even if this processing node is not fully configured. recalculate() should account for this
statsreadonlyNodeStats

Methods

MethodModifiersDescription
bind(binding)
binding(name)
doRecalculate()protectedAbstract logic for performing the node recalculation
ensureInput(name)protectedVerifies that an input socket name is known
ensureOutput(name)protected
getInputErrors()protectedGets a map of named inputs to any errors emitted
getInputValues()protectedGets a map of named inputs to the current value.
getVariadicInputValues()protected
hasBoundInput(name)protected
hasBoundInputWithNode(name, nodeId, output)protected
inputError(name)protected
inputError$(name)protected
inputValue(name)protected
inputValue$(name)protected
isSocketNameEqual(name, name2)protected
output(name)
output$(name)
unbind(name)
verifyInputSocketName(name)protected
verifyOutputSocketName(name)protected