This is the aggregate interface
The event you want to apply and add to the list of events that are not commited yet.
Call this function clear the uncommmited events array after you saved them in your event store / repository.
The current commandId of your aggregate.
The current sequence of your aggregate.
The list of events you added that need to be persisted in your event store. Call eventsCommited() when it's done to clear the array.
a snapshot (deep copy) of the current state.
Empty the snapshots array
The current state of you aggregate. Beware it's not a deep copy so if you mutate it. It will impact your aggregate state. It should never be used outside of you aggregate boundaries.
Generated using TypeDoc