Functionseedcordv0.14.0
or
Runs each gate in order and passes on the first arm that passes. Takes two or more arms. The required context is the union of the arms, so a handler that matches any one arm fits. When every arm refuses it throws the trailing OrOptionsOrOptions failfail if given, else an auto list of the arms derived from the summary field, else a default refusal. The trailing options object does not count as an arm.
See also:and
or<Gates>(
gates: Gates
): Gate<
RequiredOf<Gates[number]>,
JoinNames<Gates, " | ">
>or<Gates>(
gates: Gates
): Gate<
RequiredOf<Gates[number]>,
JoinNames<Gates, " | ">
>Gates
The tuple of two or more gate arms, tried left to right.
GatesGatesThe tuple of two or more gate arms, tried left to right.
gates
gates: Gatesgates: GatesThe gate arms to try in order, with an optional trailing OrOptionsOrOptions object.