Function: createStreamBuilder()
ts
function createStreamBuilder<TEvent, TPayload>(id, options?): StreamBuilder<TEvent, TPayload>;Defined in: builders/create-stream-builder.ts:24
Creates a fluent StreamBuilder for P.stream(id).
Validates that id is non-empty and returns a copy-on-write immutable builder that compiles into a deeply frozen StreamNode.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TEvent | unknown | Inbound event type. |
TPayload | unknown | Outbound signal payload type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Unique identifier of the stream. |
options? | CreateStreamBuilderState<TEvent, TPayload> | Optional internal copy-on-write state. |
Returns
StreamBuilder<TEvent, TPayload>
Frozen StreamBuilder instance.