Function workflow
-
workflow<const P extends readonly WorkflowPolicyClass<unknown>[] = readonly []>(
options: WorkflowOptions<P>,
): (target: WorkflowClass<RolesOf<P>>) => voidType Parameters
- const P extends readonly WorkflowPolicyClass<unknown>[] = readonly []
Parameters
- options: WorkflowOptions<P>
Returns (target: WorkflowClass<RolesOf<P>>) => void
Declares a workflow: a class extending Workflow directly, whose steps the
@withStepdecorators written below this one list, in the order they run. It goes on the top line, above every@withStep.It checks the whole declaration when the class is defined, and makes the workflow's descriptor, which
build()hands to every workflow object. It compiles only on a class that implements every role its policies request.