Function: defineWorkflow()
defineWorkflow<
I,C>(config):WorkflowDefinition<I,C>
Helper, identity function to infer types.
By using this function on a Workflow object, it properly types the input object in the context function, and the context in the callbacks for the steps.
Type Parameters
| Type Parameter | Default type |
|---|---|
I extends readonly WorkflowArgument[] | - |
C | any |
Parameters
| Parameter | Type |
|---|---|
config | { checklistDescription?: (context) => string; context: (arg) => C; description: string; docFiles: Record<string, string>; id: string; input: I; sourceUrl: string; steps: WorkflowStep<C, AnyStateMachine>[]; templateFiles: Record<string, string>; versionControl?: { allowPaths?: string[]; }; } |
config.checklistDescription? | (context) => string |
config.context | (arg) => C |
config.description | string |
config.docFiles | Record<string, string> |
config.id | string |
config.input | I |
config.sourceUrl | string |
config.steps | WorkflowStep<C, AnyStateMachine>[] |
config.templateFiles | Record<string, string> |
config.versionControl? | { allowPaths?: string[]; } |
config.versionControl.allowPaths? | string[] |
Returns
WorkflowDefinition<I, C>