Skip to main content
These operators select among one-shot signals or introduce durable time into an automation.

fallback()

fallback([preferred, backup]) selects by declaration order. A pending earlier input blocks later inputs. Closure advances to the next input; emission or failure is selected.
TypeScript requires at least two inputs. Use race when completion order should decide instead.

race()

race([first, second]) selects the first causally related input to emit or fail. Closed inputs leave the race, and the race closes only when every input closes.
Continuation contexts with the same causal roots compete in one durable race. Independent trigger contexts race separately. TypeScript requires at least two inputs.

delay()

delay(duration) emits null in a child continuation after a durable relative delay:
delay(duration, signal) starts when the signal emits and re-emits its value later. It preserves the signal’s keyed or global partition.
Pass a synchronous section as shorthand for scoping work under the elapsed signal:
Durations accept type-checked compact strings such as "3d", millisecond numbers, or compatible signals.

timeout()

timeout(signal, duration) mirrors the source if it emits or fails before the deadline. If the deadline wins, the result fails with TimeoutError. Source closure leaves the deadline active, so the result fails when the deadline arrives.
The deadline can span execution jobs, including a timeout around a multi-day delay. It does not interrupt an action handler already running. timeout preserves the source’s keyed or global partition. See burst control when timing should coordinate repeated occurrences instead of one continuation.