@grubou/bussy
Version:
Command & query bus implementations
11 lines (10 loc) • 546 B
TypeScript
import { CommandMiddleware } from './CommandMiddleware';
import { CommandHandlers } from '../types/CommandBus';
import { CommandResponse } from '../types/CommandResponse';
import { Command } from '../types/Command';
export declare class CommandBusDispatcherMiddleware<RESULT> implements CommandMiddleware<RESULT> {
private commandHandlers;
private constructor();
static build<RESULT>(handlers: CommandHandlers<RESULT>): CommandBusDispatcherMiddleware<RESULT>;
handle(command: Command<RESULT>): Promise<CommandResponse<RESULT>>;
}