Function fromStep
-
fromStep<T extends RequestType | undefined = undefined>(
key: string,
type?: T,
): ValueRequestDecorator<T, Place<StepPolicy<unknown>, string | symbol>>Type Parameters
- T extends RequestType | undefined = undefined
Parameters
- key: string
Optionaltype: T
Returns ValueRequestDecorator<T, Place<StepPolicy<unknown>, string | symbol>>
Requests data from the step a step hook acts on: what the step contributed under
keyin the attempt, committed or not, 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.