Function withStep
-
withStep<const P extends readonly StepPolicyClass<unknown>[] = readonly []>(
step: StepClass,
options: StepOptions<P>,
): (target: WorkflowClass<RolesOf<P>>) => voidType Parameters
- const P extends readonly StepPolicyClass<unknown>[] = readonly []
Parameters
- step: StepClass
- options: StepOptions<P>
Returns (target: WorkflowClass<RolesOf<P>>) => void
Adds a step to a workflow, after the steps listed on the lines below it: the class of the step, declared with
@step, and what the workflow says about it, its name first. It compiles only on a class that implements every role the step's policies request.