Setu-TS
    Preparing search index...

    Interface IDomainEvent<T>

    A domain event.

    0.1.0

    interface IDomainEvent<T = unknown> {
        aggregateId?: string;
        data: T;
        id: string;
        occurredOn: Date;
        type: string;
        version?: number;
    }

    Type Parameters

    • T = unknown

      The event payload type

    Implemented by

    Index
    aggregateId?: string

    ID of the aggregate that produced the event, when applicable.

    data: T

    The event payload.

    id: string

    Unique event ID.

    occurredOn: Date

    When the event occurred.

    type: string

    Event type name (e.g. "UserCreated").

    version?: number

    Aggregate version, for event-sourced aggregates.