/// import { AggregateIdentifier } from './AggregateIdentifier'; import Application from '../application'; import { ContextIdentifier } from './ContextIdentifier'; import EventInternal from './EventInternal'; import { Readable } from 'stream'; import { Snapshot } from '../../stores/eventstore/Snapshot'; import { State } from './State'; declare class Aggregate { readonly contextIdentifier: ContextIdentifier; readonly identifier: AggregateIdentifier; state: State; revision: number; uncommittedEvents: EventInternal[]; constructor({ contextIdentifier, aggregateIdentifier, initialState }: { contextIdentifier: ContextIdentifier; aggregateIdentifier: AggregateIdentifier; initialState: State; }); exists(): boolean; applySnapshot({ snapshot }: { snapshot: Snapshot; }): void; applyEventStream({ application, eventStream }: { application: Application; eventStream: Readable; }): Promise; } export default Aggregate;