@nestjs-cqrs-eventsourcing/core
Version:
Event sourcing for nestjs CQRS
18 lines (17 loc) • 679 B
TypeScript
import { EventStoreWrapper, EventStreamType, EventType, Query, StorableEvent } from '@nestjs-cqrs-eventsourcing/core';
export declare class EventStream implements EventStreamType {
readonly eventstore: EventStoreWrapper;
aggregateId: string;
aggregate?: string;
context?: string;
events: EventType[];
uncommittedEvents: EventType[];
lastRevision: number;
eventsToDispatch: EventType[];
readonly nonce: string;
constructor(eventstore: EventStoreWrapper, query: Query, events: EventType[]);
currentRevision(): number;
addEvent(event: StorableEvent): void;
addEvents(events: StorableEvent[]): void;
commit(): Promise<void>;
}