Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/workflow / factory / createWorkflow
Function: createWorkflow()
ts
function createWorkflow<TState, TInput>(config): Workflow<TState, TInput>;Defined in: packages/workflow/src/factory.ts:47
Build a Workflow from the supplied configuration. The factory performs eager validation so misuse is caught at build time rather than mid-execution.
Type Parameters
| Type Parameter | Default type |
|---|---|
TState extends object | Record<string, unknown> |
TInput extends Partial<TState> | Partial<TState> |
Parameters
| Parameter | Type |
|---|---|
config | WorkflowConfig<TState> |
Returns
Workflow<TState, TInput>