import { AbstractProjection } from '../AbstractProjection.ts'; import { type ProjectionView } from './utils/index.ts'; import type { IWorkerProjection, IWorkerProjectionType } from './interfaces/index.ts'; import type { IContainer, IEvent } from '../interfaces/index.ts'; /** * Projection base class that can run projection handlers and the associated view in a worker thread * to isolate CPU-heavy work and keep the main thread responsive */ export declare abstract class AbstractWorkerProjection extends AbstractProjection implements IWorkerProjection { /** * In a worker thread, creates and exposes the projection singleton. */ static createInstanceInWorkerThread>(this: new () => T, factory?: () => T): T | undefined; /** * Creates a factory that returns a `WorkerProxyProjection` for this projection type. * Use it in the main thread (for example, `builder.registerProjection(MyProjection.workerProxyFactory)`), * so events are proxied to the worker instance while exposing the remote view API. */ static workerProxyFactory, TContainer extends IContainer = IContainer, TView = ProjectionView>(this: IWorkerProjectionType, container?: TContainer): import("./WorkerProxyProjection.ts").WorkerProxyProjection; static get workerModulePath(): string; /** * Returns the last projected event if the view implements IEventLocker, otherwise undefined. */ getLastProjectedEvent(): Promise; }