Files
gridpilot.gg/core/shared/domain/DomainEvent.ts
2025-12-23 11:25:08 +01:00

13 lines
356 B
TypeScript

export interface DomainEvent<T = unknown> {
readonly eventType: string;
readonly aggregateId: string;
readonly eventData: T;
readonly occurredAt: Date;
}
export interface DomainEventPublisher {
publish(event: DomainEvent): Promise<void>;
}
// Alias for backward compatibility
export interface IDomainEvent<T = unknown> extends DomainEvent<T> {}