UNPKG

@grubou/bussy

Version:

Command & query bus implementations

12 lines (11 loc) 579 B
import { BusLogger } from '../../common/BusLogger'; import { ChainableCommandMiddleware, CommandMiddleware } from './CommandMiddleware'; import { Command } from '../types/Command'; import { CommandResponse } from '../types/CommandResponse'; export declare class LoggingCommandBusMiddleware<RESULT> implements CommandMiddleware<RESULT> { private logger; private next; private constructor(); static build<T>(logger: BusLogger): ChainableCommandMiddleware<T, LoggingCommandBusMiddleware<T>>; handle(command: Command<RESULT>): Promise<CommandResponse<RESULT>>; }