automate.ax let you derive values and control which work becomes ready without awaiting a signal.
Interpolate text with t
Use the t tagged template to combine signals with static text or in-memory values:
automations/request-notification.automation.ts
t returns a Signal<string> that depends on every interpolated signal. It converts each resolved signal and ordinary interpolated value with String().
Transform values
Every signal has a.transform() method for deriving a value from one signal:
transform function when a result depends on several signals:
Route values conditionally
Usefilter to preserve a signal only when a predicate matches:
filter(signal, predicate) emits the original value when the predicate returns true. Otherwise, it closes without a value, so work that depends on it does not run.
Use partition when both outcomes need separate paths:
gate when you already have a boolean signal:
gate(value, condition, expected) emits value when condition equals expected and closes otherwise. expected defaults to true.
Branch automation work
Usebranch when different actions should run for the two outcomes of a boolean signal:
automations/route-request.automation.ts
branch then returns a signal for the selected result. When only the true callback is provided and it returns a signal, that result closes when the condition is false.
Add an ordering dependency
Usegroup when actions must wait for signals that they do not consume as inputs:
group(dependencies, callback) makes every action called synchronously inside the callback wait for one signal or an array of signals. It returns the callback’s result unchanged.
Handle closure and failure
A signal can emit a value, close without one, or fail.closed(signal) and failed(signal) project those lifecycle outcomes as ordinary signals:
failed(signal) emits { name: string, message: string } only when the source fails. closed(signal) emits void only when the source closes without a value. Each lifecycle signal closes for every other outcome.
Inspect a value
isSignal(value) is a TypeScript type guard for reusable helpers that accept ordinary values or signals:
isSignal; action inputs already accept compatible signals.