@dolittle/sdk.projections
Version:
Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.
26 lines • 1.44 kB
TypeScript
import { Guid } from '@dolittle/rudiments';
import { Constructor } from '@dolittle/types';
import { Decorators } from '@dolittle/sdk.common';
import { ProjectionId } from '../ProjectionId';
import { ProjectionDecoratedType } from './ProjectionDecoratedType';
import { ProjectionOptions } from './ProjectionOptions';
/**
* Decorator to mark a class as an Projection.
* @param {ProjectionId | Guid | string} projectionId - The id to associate with this Projection.
* @param {ProjectionOptions} [options={}] - Options to give to the Projection.
* @returns {Decorators.Decorator} The decorator.
*/
export declare function projection(projectionId: ProjectionId | Guid | string, options?: ProjectionOptions): Decorators.Decorator;
/**
* Checks whether the specified class is decorated with an projection type.
* @param {Constructor<any>} type - The class to check the decorated projection type for.
* @returns {boolean} True if the decorator is applied, false if not.
*/
export declare function isDecoratedProjectionType(type: Constructor<any>): boolean;
/**
* Gets the {@link ProjectionDecoratedType} of the specified class.
* @param {Constructor<any>} type - The class to get the decorated projection type for.
* @returns {ProjectionDecoratedType} The decorated projection type.
*/
export declare function getDecoratedProjectionType(type: Constructor<any>): ProjectionDecoratedType;
//# sourceMappingURL=projectionDecorator.d.ts.map