import { Options } from '.';
import { ResultType } from './constants';
import { CommandHandler, Handler, HandlerType } from './interfaces';
import { IType } from './interfaces/type.interface';
import { Command } from './models/command';
import { CommandBusOptions } from './models/commandBusOptions';
export declare abstract class CommandBusBase<C extends Command = Command, O extends Options = Options> {
    protected handlers: Map<string, [Handler<C, O>, CommandHandler<C, O>?]>;
    protected name: string;
    protected injectionResolver: CommandBusOptions<C, O>['injectionResolver'];
    onExecute?: CommandBusOptions<C, O>['onExecute'];
    constructor(options?: CommandBusOptions<C, O>);
    bindHandler<T extends C = C>(handler: (command: T) => T[ResultType], commandName: string, handlerInstance?: CommandHandler<T, O>): void;
    registerHandlerInstance(handlerInstance: CommandHandler<C, O>): void;
    registerHandlersInstances(handlersInstances?: Array<CommandHandler<C, O>>): void;
    registerHandlerFactory(Handler: HandlerType<C, O>, injectionResolver?: CommandBusOptions['injectionResolver']): void;
    registerHandlersFactories(handlersFactories?: Array<HandlerType<C, O>>, injectionResolver?: CommandBusOptions['injectionResolver']): void;
    registerFunctionHandler<T extends C = C>(command: IType<T>, handler: Handler<T, O>): void;
    registerFunctionHandlers(handlers: Array<[IType<C>, Handler<C, O>]>): void;
    execute<T extends C = C>(command: T, options?: O): T[ResultType];
    protected executeByName<T extends C = C, Opts extends O = O>(commandName: string, data: T, options?: Opts): C[ResultType];
}
