import type { Convergence } from '../../Convergence'; import { OperationConstructor, Operation, KeyOfOperation, InputOfOperation, OutputOfOperation, OperationHandler, OperationOptions, OperationScope } from '../../types'; import { DisposableScope } from '../../utils'; import { AsyncCollection } from './AsyncCollection'; /** * @group Modules */ export declare class OperationClient { protected readonly convergence: Convergence; /** * Maps the name of an operation with its operation handler. * Whilst the types on the Map are relatively loose, we ensure * operations match with their handlers when registering them. */ protected operationHandlers: Map>; constructor(convergence: Convergence); register, K extends string = KeyOfOperation, I = InputOfOperation, O = OutputOfOperation>(operationConstructor: OperationConstructor, operationHandler: OperationHandler): this; get, K extends string = KeyOfOperation, I = InputOfOperation, O = OutputOfOperation>(operation: T): OperationHandler; execute, K extends string = KeyOfOperation, I = InputOfOperation, O = OutputOfOperation>(operation: T, options?: OperationOptions): Promise; toCollection, K extends string = KeyOfOperation, I = InputOfOperation, O = OutputOfOperation>(operation: T, options?: OperationOptions): AsyncCollection; protected getOperationScope(options: OperationOptions, scope: DisposableScope): OperationScope; }