@robotlegsjs/core
Version:
An architecture-based IoC framework for JavaScript/TypeScript
29 lines (28 loc) • 868 B
TypeScript
import { ICommand } from "../../commandCenter/api/ICommand";
import { IClass } from "../../matching/IClass";
import { IDirectCommandMapper } from "./IDirectCommandMapper";
export declare const IDirectCommandMap: unique symbol;
/**
* Maps commands for direct (manual) execution
*/
export interface IDirectCommandMap extends IDirectCommandMapper {
/**
* Pins a command in memory
*
* @param command the command instance to pin
*/
detain(command: IClass<ICommand>): void;
/**
* Unpins a command instance from memory
*
* @param command the command instance to unpin
*/
release(command: IClass<ICommand>): void;
/**
* Adds a handler to process mappings
*
* @param handler Function that accepts a mapping
* @return Self
*/
addMappingProcessor(handler: Function): IDirectCommandMap;
}