TypeMatchValidatorOptions
Defined in: src/components/editor/NodeGraph/createTypeMatchValidator.ts:6
Properties
allowSameNode?
optionalallowSameNode:boolean
Defined in: src/components/editor/NodeGraph/createTypeMatchValidator.ts:21
Allow connecting two ports on the same node.
Default
falseanyType?
optionalanyType:string
Defined in: src/components/editor/NodeGraph/createTypeMatchValidator.ts:17
dataType token that connects to anything.
Default
'any'directions?
optionaldirections: readonlystring[]
Defined in: src/components/editor/NodeGraph/createTypeMatchValidator.ts:13
Allowed info.sideCombo values (e.g. 'right->left'). Defaults to both
horizontal directions so the user can start the drag from either end of
a wire. Pass ['right->left'] to force output→input only.
Default
['right->left', 'left->right']match()?
optionalmatch: (sourceDataType,targetDataType) =>boolean
Defined in: src/components/editor/NodeGraph/createTypeMatchValidator.ts:27
Custom type comparison, replacing the default (equality + anyType +
“untyped ports accept anything”). Receives the resolved dataTypes,
either of which may be undefined when the port declared none.
Parameters
sourceDataType
string | undefined
targetDataType
string | undefined
Returns
boolean