Skip to main content

Calculator

Calculator<ValueType, StateType> = (node, context) => NodeEvaluation<ValueType, StateType> | undefined

Evaluates a node from its current upstream inputs - the function has access to the input(...) and inputs(..) methods on the evaluation context that is passed in, for resolving the input values on the node.

Type Parameters​

ValueType​

ValueType

Defines the type of the node's output values.

StateType​

StateType = unknown

Defines the type of the node's internal state.

Parameters​

node​

Node

context​

EvaluationContext<ValueType>

Returns​

NodeEvaluation<ValueType, StateType> | undefined