Skip to content

Interface: StreamNode<TEvent, TPayload> ​

Defined in: ast/stream-node.ts:14

Passive AST node representing an inbound event stream (P.stream(id)).

Subscribes to a StreamSourceASTNode<TEvent>, optionally filters inbound events via filterFn, and projects matching events into a typed SignalNode<TPayload> via mapPayload.

Type Parameters ​

Type ParameterDefault typeDescription
TEventunknownInbound raw event type emitted by source.
TPayloadunknownOutbound signal payload type emitted into the harness.

Properties ​

PropertyModifierTypeDescriptionDefined in
filterFn?readonlyBivariantCallback<[event: TEvent], boolean>Optional synchronous predicate filtering raw events before signal emission.ast/stream-node.ts:22
idreadonlystringUnique identifier of the stream definition.ast/stream-node.ts:18
mapPayloadreadonlyBivariantCallback<[event: TEvent], TPayload>Synchronous mapper projecting a matched TEvent into TPayload.ast/stream-node.ts:26
signalreadonlySignalNode<TPayload>Target SignalNode<TPayload> emitted when an event matches.ast/stream-node.ts:24
sourcereadonlyGithubWebhookStreamNode<TEvent>Passive stream source AST node providing inbound events.ast/stream-node.ts:20
typereadonly"harness:stream"Discriminant identifying an inbound stream AST node.ast/stream-node.ts:16

Released under the MIT License.