Skip to content

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 ParameterDefault type
TState extends objectRecord&lt;string, unknown&gt;
TInput extends Partial&lt;TState&gt;Partial&lt;TState&gt;

Parameters

ParameterType
configWorkflowConfig&lt;TState&gt;

Returns

Workflow&lt;TState, TInput&gt;

Stable