Snapshot<S, E>: {
    applyCount: number;
    event?: CommittedEvent<E>;
    state: S;
    stateCount: number;
}

Snapshots hold reduced state and last applied event

  • state the current state of the artifact
  • event? the last event applied to the state
  • applyCount the number of events reduced after last snapshot
  • stateCount the number of state events after last snapshot

Type Parameters

Type declaration

  • Readonly applyCount: number
  • Optional Readonly event?: CommittedEvent<E>
  • Readonly state: S
  • Readonly stateCount: number

Generated using TypeDoc