@dolittle/sdk.projections
Version:
Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.
33 lines • 1.4 kB
TypeScript
import { IEquatable } from '@dolittle/rudiments';
import { IClientBuildResults } from '@dolittle/sdk.common';
import { IEventTypes } from '@dolittle/sdk.events';
import { IProjection } from '../IProjection';
import { ProjectionDecoratedType } from './ProjectionDecoratedType';
/**
* Represents a builder for building a projection from a class.
* @template T The type of the projection class.
*/
export declare class ProjectionClassBuilder<T> implements IEquatable {
readonly type: ProjectionDecoratedType;
/**
* Initialises a new instance of the {@link FailureReason} class.
* @param {ProjectionDecoratedType} type - The decorated projection type of the class.
*/
constructor(type: ProjectionDecoratedType);
/** @inheritdoc */
equals(other: any): boolean;
/**
* Builds the projection.
* @param {IEventTypes} eventTypes - For event types resolution.
* @param {IClientBuildResults} results - For keeping track of build results.
* @returns {IProjection | undefined} The built projection if successful.
*/
build(eventTypes: IEventTypes, results: IClientBuildResults): IProjection<T> | undefined;
private tryAddAllOnMethods;
private tryGetEventTypeFromMethod;
private eventTypeIsId;
private createOnMethod;
private buildCopies;
private buildMongoDBCopies;
}
//# sourceMappingURL=ProjectionClassBuilder.d.ts.map