Skip to content

SubscribeOptions

type SubscribeOptions<TFilter> = {
abortSignal?: AbortSignal;
filter?: z.infer<TFilter>;
};

Defined in: core/src/event/event.registry.ts:15

How a subscriber narrows what it receives, and how long it stays subscribed.

Type Parameter Default type
TFilter extends z.ZodType z.ZodType
optional abortSignal?: AbortSignal;

Defined in: core/src/event/event.registry.ts:22


optional filter?: z.infer<TFilter>;

Defined in: core/src/event/event.registry.ts:21

Only deliver occurrences the event’s check accepts for this value. Omit it to receive every occurrence — no filter means no filtering, and check is not consulted at all.