Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/workflow / node / createNode
Function: createNode()
ts
function createNode<TState>(opts): WorkflowNode<TState>;Defined in: packages/workflow/src/node.ts:18
Construct a WorkflowNode. The wrapper exists to give the engine a stable shape and to keep createWorkflow({...}) callers from instantiating nodes by hand.
Type Parameters
| Type Parameter | Default type |
|---|---|
TState extends object | Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
opts | { name: string; run: WorkflowNodeRun<TState>; } |
opts.name | string |
opts.run | WorkflowNodeRun<TState> |
Returns
WorkflowNode<TState>