UNPKG

@farris/devkit-vue

Version:
31 lines (30 loc) 766 B
import { Injector } from '../common'; import { VariableParseService } from '../variable/index'; import { Command } from './command'; import { CommandHandlerFactory } from './command-handler-factory'; /** * 命令总线 */ declare class CommandBus { private injector; private handlerFactory; private variableParseService; /** * 视图模型 */ private viewModel; constructor(injector: Injector, handlerFactory: CommandHandlerFactory, variableParseService: VariableParseService); /** * 派发命令 */ dispatch(command: Command): Promise<any>; /** * 执行命令 */ private executeCommand; /** * 生成命令上下文 */ private generateCommandContext; } export { CommandBus };