ApplyMutationOptions
Defined in: packages/ddd-core/domain/decorators/apply-mutation.decorator.ts:28
Configuration for a declarative aggregate mutation and domain event application.
Type Parameters
Section titled “Type Parameters”TEntity
Section titled “TEntity”TEntity
The aggregate the decorated method belongs to.
Properties
Section titled “Properties”
readonlyevent: (entity) =>NonEmptyEventArray|SingleEvent
Defined in: packages/ddd-core/domain/decorators/apply-mutation.decorator.ts:37
Factory for the domain event(s) recorded once the mutation has completed.
It receives the aggregate after the patch, onUpdate() and the
version/timestamp advance, ensuring event payload and metadata snapshot
the post-mutation version and updatedAt.
Must return a single domain event object or a non-empty array of domain events.
Parameters
Section titled “Parameters”entity
Section titled “entity”TEntity