Implements IDomainEvent<T>. Auto-generates id and occurredOn from
IRuntimeServices (never Date.now()). Optional aggregateId/version
are omitted from the object when not supplied (honors exactOptionalPropertyTypes).
Example
// Raw construction when runtime is in scope classUserCreatedextendsDomainEvent<{ userId: string }> { readonlytype = 'UserCreated'; } constevent = newUserCreated(runtime, { userId:'123' });
Abstract base class for domain events.
Implements
IDomainEvent<T>. Auto-generatesidandoccurredOnfromIRuntimeServices(neverDate.now()). OptionalaggregateId/versionare omitted from the object when not supplied (honorsexactOptionalPropertyTypes).Example
Since
0.1.0