UNPKG

@robotlegsjs/core

Version:

An architecture-based IoC framework for JavaScript/TypeScript

48 lines (47 loc) 1.3 kB
import { IClass } from "../../matching/IClass"; import { ICommand } from "../api/ICommand"; import { ICommandMappingList } from "../api/ICommandMappingList"; import { ICommandConfigurator } from "../dsl/ICommandConfigurator"; import { ICommandMapper } from "../dsl/ICommandMapper"; import { ICommandUnmapper } from "../dsl/ICommandUnmapper"; /** * @private */ export declare class CommandMapper implements ICommandMapper, ICommandUnmapper, ICommandConfigurator { private _mappings; private _mapping; /** * Creates a Command Mapper * * @param mappings The command mapping list to add mappings to */ constructor(mappings: ICommandMappingList); /** * @inheritDoc */ toCommand(commandClass: IClass<ICommand>): ICommandConfigurator; /** * @inheritDoc */ fromCommand(commandClass: IClass<ICommand>): void; /** * @inheritDoc */ fromAll(): void; /** * @inheritDoc */ once(value?: boolean): ICommandConfigurator; /** * @inheritDoc */ withGuards(...guards: any[]): ICommandConfigurator; /** * @inheritDoc */ withHooks(...hooks: any[]): ICommandConfigurator; /** * @inheritDoc */ withPayloadInjection(value?: boolean): ICommandConfigurator; }