defineDomainEvent(runtime: IRuntimeServices): { DomainEvent: new <T>(data: T,opts?: { aggregateId?: string; version?: number; }) => DomainEvent<T>; IntegrationEvent: new <T>(data: T,opts?: { aggregateId?: string; version?: number; }) => IntegrationEvent<T>; }
Runtime-bound abstract bases for ergonomic construction.
Call once per app with ctx.runtime; returns abstract classes that can be
extended and constructed as new X(data) without threading runtime.
{ DomainEvent: new <T>(data: T,opts?: { aggregateId?: string; version?: number; }) => DomainEvent<T>; IntegrationEvent: new <T>(data: T,opts?: { aggregateId?: string; version?: number; }) => IntegrationEvent<T>; }
Runtime-bound { DomainEvent, IntegrationEvent } abstract bases