UNPKG

@dolittle/sdk.aggregates

Version:

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

25 lines 1.31 kB
import { Constructor } from '@dolittle/types'; import { GenerationLike } from '@dolittle/sdk.artifacts'; import { Decorators } from '@dolittle/sdk.common'; import { EventTypeIdLike } from '@dolittle/sdk.events'; import { OnDecoratedMethod } from './OnDecoratedMethod'; /** * Decorator for decorating aggregate root on methods. * @param {Constructor<TEvent>} type - The type of the event to handle. * @returns {Decorators.Decorator} The decorator. * @template TEvent The event type to handle. */ export declare function on<TEvent>(type: Constructor<TEvent>): Decorators.Decorator; /** * Decorator for decorating aggregate root on methods. * @param {EventTypeIdLike} eventTypeId - The event type id to handle. * @param {GenerationLike} [generation] - The optional generation of the event type to handle. */ export declare function on(eventTypeId: EventTypeIdLike, generation?: GenerationLike): Decorators.Decorator; /** * Gets the decorated aggregate root on methods of the specified class. * @param {Constructor<any>} type - The class to get the decorated aggregate root on methods for. * @returns {OnDecoratedMethod[]} The decorated aggregate root on methods. */ export declare function getOnDecoratedMethods(type: Constructor<any>): OnDecoratedMethod[]; //# sourceMappingURL=onDecorator.d.ts.map