Function input
-
input<T extends RequestType | undefined = undefined>(
key: string,
type?: T,
): ValueRequestDecorator<T, Place<StepClass | RescueStepClass, undefined>>Type Parameters
- T extends RequestType | undefined = undefined
Parameters
- key: string
Optionaltype: T
Returns ValueRequestDecorator<T, Place<StepClass | RescueStepClass, undefined>>
Requests one of the inputs of a step or a rescue step, on a parameter of its constructor: the value under
key, from the step's input adapter or 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.An input is required unless
typeis wrapped inoptional.