Interface StepPolicyBuilder<C>
interface StepPolicyBuilder<C extends StepPolicyClass> {
onStepAbnormalTermination<K extends string | symbol>(
key: K,
...requests: Tokens<
ParametersOf<InstanceType<C>, K>,
Place<InstanceType<C>, K>,
>,
): this;
onStepFailure<K extends string | symbol>(
key: K,
...requests: Tokens<
ParametersOf<InstanceType<C>, K>,
Place<InstanceType<C>, K>,
>,
): this;
onStepRetry<K extends string | symbol>(
key: K,
...requests: Tokens<
ParametersOf<InstanceType<C>, K>,
Place<InstanceType<C>, K>,
>,
): this;
onStepSuccess<K extends string | symbol>(
key: K,
...requests: Tokens<
ParametersOf<InstanceType<C>, K>,
Place<InstanceType<C>, K>,
>,
): this;
}
onStepAbnormalTermination<K extends string | symbol>(
key: K,
...requests: Tokens<
ParametersOf<InstanceType<C>, K>,
Place<InstanceType<C>, K>,
>,
): this;
onStepFailure<K extends string | symbol>(
key: K,
...requests: Tokens<
ParametersOf<InstanceType<C>, K>,
Place<InstanceType<C>, K>,
>,
): this;
onStepRetry<K extends string | symbol>(
key: K,
...requests: Tokens<
ParametersOf<InstanceType<C>, K>,
Place<InstanceType<C>, K>,
>,
): this;
onStepSuccess<K extends string | symbol>(
key: K,
...requests: Tokens<
ParametersOf<InstanceType<C>, K>,
Place<InstanceType<C>, K>,
>,
): this;
}
Type Parameters
- C extends StepPolicyClass
The class of the policy.
Index
Methods
on Step Abnormal Termination
-
onStepAbnormalTermination<K extends string | symbol>(
key: K,
...requests: Tokens<
ParametersOf<InstanceType<C>, K>,
Place<InstanceType<C>, K>,
>,
): thisMakes the method
keythe policy'son step abnormal termination, its parameters makingrequests, in order.Type Parameters
- K extends string | symbol
Returns this
Throws
Error, at once, as StepPolicyBuilder.onStepFailure does.
on Step Failure
on Step Retry
-
onStepRetry<K extends string | symbol>(
key: K,
...requests: Tokens<
ParametersOf<InstanceType<C>, K>,
Place<InstanceType<C>, K>,
>,
): thisMakes the method
keythe policy'son step retry, its parameters makingrequests, in order.Type Parameters
- K extends string | symbol
Returns this
Throws
Error, at once, as StepPolicyBuilder.onStepFailure does.
on Step Success
-
onStepSuccess<K extends string | symbol>(
key: K,
...requests: Tokens<
ParametersOf<InstanceType<C>, K>,
Place<InstanceType<C>, K>,
>,
): thisMakes the method
keythe policy'son step success, its parameters makingrequests, in order.Type Parameters
- K extends string | symbol
Returns this
Throws
Error, at once, as StepPolicyBuilder.onStepFailure does.
Puts a step policy of the class
Ctogether for a step's builder, which takes it in itspolicy: started by the policy class's staticbuilder(name), for a class declared without decorators. Each method names the method of the class that implements a hook, and gives the requests of its parameters by position.