WorkflowTransition
interface exported by @mwillbanks/tuil-workflow.
interface
Public interface exported by @mwillbanks/tuil-workflow.
export interface WorkflowTransition<TState> {
readonly from: string;
readonly to: string;
readonly when?: (
context: WorkflowContext<TState>,
) => boolean | Promise<boolean>;
}Members
| Member | Type | Required | Description | Related types |
|---|---|---|---|---|
from | string | Yes | The from member uses the string contract. | — |
to | string | Yes | The to member uses the string contract. | — |
when | ((context: WorkflowContext<TState>) => boolean | Promise<boolean>) | undefined | No | The when member uses the ((context: WorkflowContext<TState>) => boolean | Promise<boolean>) | undefined contract. | WorkflowContext |
Parameters
This declaration has no public members.
Returns
This declaration does not return a value.
Throws
No thrown errors are documented for this declaration.
Related types
Source
View the secondary source reference