import { IInterceptor, IServiceContainer, Newable } from '@aesop-fables/containr'; import { DataStore } from './DataStore'; export type ProjectionConstructor = new (context: ProjectionContext, ...args: any[]) => T; export declare type Projectable = ProjectionConstructor | IProjectionFactory | Newable; export interface ProjectionContext { storage: DataStore; container: IServiceContainer; } export interface IProjectionFactory { create(context: ProjectionContext): T; } export declare class InjectProjectionContextInterceptor implements IInterceptor { resolve(currentValue: any | undefined, container: IServiceContainer): any; } export declare function injectProjectionContext(): (constructor: Object, propertyKey: string | symbol | undefined, parameterIndex: number) => void; export declare function createProjection(storage: DataStore, container: IServiceContainer, constructor: ProjectionConstructor | IProjectionFactory | Newable, ...args: any[]): Projection; export declare class FromProjectionInterceptor implements IInterceptor { private readonly projection; constructor(projection: ProjectionConstructor | IProjectionFactory | Newable); resolve(currentValue: Projection | undefined, container: IServiceContainer): Projection; } export declare function fromProjection(projection: ProjectionConstructor | IProjectionFactory | Newable): (constructor: Object, propertyKey: string | symbol | undefined, parameterIndex: number) => void;