Skip to content

Interface: HarnessSignalNotificationBuilder<TPayload> ​

Defined in: builders/harness-signal-notification-builder.ts:13

Fluent sub-builder for a root-level signal notification rule (harness.onSignal(sig, $sig => $sig.notify(human, mapper))).

Routes an emitted SignalNode<TPayload> to a HumanNode channel using a synchronous message formatter.

Type Parameters ​

Type ParameterDefault typeDescription
TPayloadunknownSignal payload type.

Methods ​

notify() ​

ts
notify(human, messageMapper): HarnessSignalNotificationBuilder<TPayload>;

Defined in: builders/harness-signal-notification-builder.ts:24

Routes the emitted signal to a HumanNode channel using messageMapper.

Accepts both 'bidirectional' and 'notify-only' human channels for outbound notifications.

Parameters ​

ParameterTypeDescription
human| MaybeBuilder<HumanNode<"bidirectional">> | MaybeBuilder<HumanNode<"notify-only">> | MaybeBuilder<HumanNode<"bidirectional" | "notify-only">>Target human authority or notification channel.
messageMapper(payload) => stringSynchronous notification message formatter.

Returns ​

HarnessSignalNotificationBuilder<TPayload>

New immutable signal notification builder.


toAST() ​

ts
toAST(): HarnessSignalNotification<TPayload>;

Defined in: builders/harness-signal-notification-builder.ts:39

Compiles this notification builder into an immutable HarnessSignalNotification.

Throws at builder compilation time if .notify(human, mapper) has not been called.

Returns ​

HarnessSignalNotification<TPayload>

Deeply frozen signal notification record.

Released under the MIT License.