Interface IEventDefinition<TPayload>

interface IEventDefinition<TPayload> {
    id: string;
    meta?: IEventMeta;
    parallel?: boolean;
    payloadSchema?: IValidationSchema<TPayload>;
    tags?: TagType[];
}

Type Parameters

  • TPayload = void

Hierarchy (view full)

Properties

id: string
meta?: IEventMeta
parallel?: boolean

If true, listeners with the same priority run concurrently within a batch. Batches (grouped by order) still execute sequentially in priority order.

payloadSchema?: IValidationSchema<TPayload>

Optional validation schema for runtime payload validation. When provided, event payload will be validated when emitted.

tags?: TagType[]