UNPKG

@dolittle/sdk.aggregates

Version:

Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.

32 lines 1.72 kB
import { Logger } from 'winston'; import { Constructor } from '@dolittle/types'; import { EventSourceIdLike, IEventStore, IEventTypes } from '@dolittle/sdk.events'; import { AggregateRoot } from './AggregateRoot'; import { AggregateRootType } from './AggregateRootType'; import { IAggregateOf } from './IAggregateOf'; import { IAggregateRootOperations } from './IAggregateRootOperations'; /** * Represents an implementation of {@link IAggregateOf<TAggregateRoot>}. * @template TAggregateRoot */ export declare class AggregateOf<TAggregateRoot extends AggregateRoot> extends IAggregateOf<TAggregateRoot> { private readonly _type; private readonly _aggregateRootType; private readonly _eventStore; private readonly _eventTypes; private readonly _logger; /** * Initialises a new instance of the {@link AggregateOf} class. * @param {Constructor<TAggregateRoot>} _type - The class implementing the aggregate root. * @param {AggregateRootType} _aggregateRootType - The aggregate root type associated with the aggregate root. * @param {IEventStore} _eventStore - The event store to fetch committed events from and commit aggregate events with. * @param {IEventTypes} _eventTypes - All registered event types. * @param {Logger} _logger - The logger to use for logging. */ constructor(_type: Constructor<TAggregateRoot>, _aggregateRootType: AggregateRootType, _eventStore: IEventStore, _eventTypes: IEventTypes, _logger: Logger); /** @inheritdoc */ create(): IAggregateRootOperations<TAggregateRoot>; /** @inheritdoc */ get(eventSourceId: EventSourceIdLike): IAggregateRootOperations<TAggregateRoot>; } //# sourceMappingURL=AggregateOf.d.ts.map