export interface Command {
    /**
     * 没有历史记录,也不破坏历史记录
     * 例如Save或者Undo,Redo.
     * 这些命令没有历史记录,但如果不增加约束,可能会破坏历史
     */
    NoHistory?: boolean;
    Transparency?: boolean;
    exec: Function;
}
declare class CommandMachine {
    CommandMap: Map<string, Command>;
    LastExecCmd: string;
    private _CommandNameSet;
    ExecCommand(cmdName: string): Promise<void>;
    RegisterCommand(cmdName: string, cmd: Command): void;
    RemoveCommand(cmdName: string): void;
    /**
     * 意味着命令开始,系统将会帮你初始化一些事情.
     * @param cmdName
     * @returns 命令开始状态,如果成功返回true.
     */
    CommandStart(cmdName: string, noHistory?: boolean): boolean;
    /**
     * 意味着命令结束了,调用这个,系统会帮你做一些事情
     * @param [abort] 是否取消该命令
     */
    CommandEnd(abort?: boolean, noHistory?: boolean): Promise<void>;
    get CommandNameSet(): Set<string>;
}
export declare const commandMachine: CommandMachine;
export declare function CommandWrap(exec: Function, cmdName?: string): Promise<void>;
export {};
//# sourceMappingURL=CommandMachine.d.ts.map