Files
gridpilot.gg/core/shared/domain/DomainEvent.ts
2026-01-16 16:46:57 +01:00

14 lines
348 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 type DomainEventAlias<T = unknown> = DomainEvent<T>;