Interface: SignalPayloadBuilder<TPayload>
Defined in: builders/signal-payload-builder.ts:12
Fluent builder returned by P.signal(id) with .payload(schema) configuration and direct AST property access.
Extends SignalBuilder<TPayload> so the builder can be passed directly wherever a SignalNode<TPayload> or AstBuilder<SignalNode<TPayload>> is expected.
Extends
SignalBuilder<TPayload>
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TPayload | unknown | Signal payload type validated by schema. |
Methods
payload()
payload<TNext>(schema): SignalPayloadBuilder<TNext>;Defined in: builders/signal-payload-builder.ts:27
Binds a Zod payload schema to the signal and returns a new immutable SignalPayloadBuilder<TNext>.
Replaces the default z.unknown() payload schema while preserving the signal's id.
Type Parameters
| Type Parameter | Description |
|---|---|
TNext | New signal payload output type inferred from schema. |
Parameters
| Parameter | Type | Description |
|---|---|---|
schema | ZodType<TNext> | Zod schema validating signal payloads. |
Returns
SignalPayloadBuilder<TNext>
New immutable signal builder instance.
Overrides
toAST()
toAST(): SignalNode;Defined in: ast/ast-builder.ts:20
Compiles the current builder configuration into a deeply frozen passive AST node.
Validates required builder invariants at compilation time and returns an immutable plain-object AST representation containing zero execution methods.
Returns
Deeply frozen passive AST node.
Inherited from
Properties
| Property | Modifier | Type | Description | Overrides | Inherited from | Defined in |
|---|---|---|---|---|---|---|
id | readonly | string | Unique logical identifier of the signal. | - | SignalBuilder.id | ast/signal-builder.ts:17 |
schema | readonly | ZodType<TPayload> | Zod schema used to validate payloads emitted for this signal. | - | SignalBuilder.schema | ast/signal-builder.ts:19 |
type | readonly | "harness:signal" | Discriminant identifying a signal AST node. | SignalBuilder.type | - | builders/signal-payload-builder.ts:14 |