Function fromWorkflow
-
fromWorkflow<T extends RequestType | undefined = undefined>(
key: string,
type?: T,
): ValueRequestDecorator<
T,
Place<
StepPolicy<unknown>
| WorkflowPolicy<unknown>
| Workflow,
string | symbol,
>,
>Type Parameters
- T extends RequestType | undefined = undefined
Parameters
- key: string
Optionaltype: T
Returns ValueRequestDecorator<
T,
Place<
StepPolicy<unknown>
| WorkflowPolicy<unknown>
| Workflow,
string | symbol,
>,
>
Requests data from the workflow, in a hook, an input adapter or a service provider: the value under
keyin the data bag, checked bytype. With no type written, the parameter's own type is checked, as the compiler records it, which it can say only fornumber,string,booleanand a class that serialises itself.The data is required unless
typeis wrapped inoptional.