import { Query } from "./Query";
import { IQueryHandler } from "./QueryHandler";
import { QueryResponse } from "./QueryResponse";
export type QueryHandlerType = IQueryHandler<Query<QueryResponse>>;
export interface IQueryBus<T extends QueryResponse> {
    execute<X extends T>(query: Query<X>): Promise<X>;
    bind<X extends T>(handler: IQueryHandler<Query<X>>, id: string): void;
}
export declare class QueryBus<T extends QueryResponse = QueryResponse> implements IQueryBus<T> {
    handlers: Map<string, {
        execute(query: Query<T>): Promise<T>;
    }>;
    constructor();
    execute<X extends T>(query: Query<X>): Promise<X>;
    bind<X extends T>(handler: IQueryHandler<Query<X>>, id: string): void;
    private getQueryId;
    protected registerHandlers(handlers: QueryHandlerType[]): void;
    private reflectQueryId;
}
