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
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(inputs, outputs) | Creates a new instance of the BaseNode |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| _inputs | protected | SocketName[] | |
| _outputs | protected | SocketName[] | |
| bindings | readonly | NodeBinding<T>[] | |
| bindings$ | readonly | Observable<NodeBinding<T>[]> | |
| config | Maybe<Config> | ||
| config$ | readonly | Observable<Maybe<Config>> | |
| emit | protected | (value: Maybe<T>, socketName?: SocketName) => void | Emits a new value into the named output socket |
| emitError | protected | (error: unknown, socketName?: SocketName) => void | Emits a downstream error |
| id | NodeId | ||
| inputs | SocketName[] | ||
| isBindingRequired |
| boolean | If 'isBindingRequired' is true (the default), then config-changes will not drive recomputes if no input bindings are present. |
| outputs | SocketName[] | ||
| recalculate | protected | (cause: string) => void | Calculate the value of this processing node. This may be invoked even if this processing node is not fully configured. recalculate() should account for this |
| stats | readonly | NodeStats |
Methods
| Method | Modifiers | Description |
|---|---|---|
| bind(binding) | ||
| binding(name) | ||
| doRecalculate() | protected | Abstract logic for performing the node recalculation |
| ensureInput(name) | protected | Verifies that an input socket name is known |
| ensureOutput(name) | protected | |
| getInputErrors() | protected | Gets a map of named inputs to any errors emitted |
| getInputValues() | protected | Gets 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 |