TypeMatchValidatorOptions
Defined in: src/components/editor/NodeGraph/createTypeMatchValidator.ts:6
Properties
Section titled “Properties”allowSameNode?
Section titled “allowSameNode?”
optionalallowSameNode?:boolean
Defined in: src/components/editor/NodeGraph/createTypeMatchValidator.ts:21
Allow connecting two ports on the same node.
Default
Section titled “Default”falseanyType?
Section titled “anyType?”
optionalanyType?:string
Defined in: src/components/editor/NodeGraph/createTypeMatchValidator.ts:17
dataType token that connects to anything.
Default
Section titled “Default”'any'directions?
Section titled “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
Section titled “Default”['right->left', 'left->right']match?
Section titled “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
Section titled “Parameters”sourceDataType
Section titled “sourceDataType”string | undefined
targetDataType
Section titled “targetDataType”string | undefined
Returns
Section titled “Returns”boolean