import { Command, Options } from '..';
import { Plugin } from '../interfaces/plugin.interface';
declare type UndoableResult<T = any, Q = void, Strict extends boolean = true> = Strict extends true ? {
    undo: () => Q;
    value: T;
    name?: string;
} : {
    undo?: () => Q;
    value: T;
    name?: string;
};
export declare class UndoableCommandController<Strict extends boolean = true> {
    historySize: number;
    history: Array<UndoableResult<any, any, Strict>>;
    constructor(historySize?: number);
    undoLast(): UndoableResult<any, any, Strict>;
    addEntry<T = any, Q = void, S extends Strict = Strict>(result: UndoableResult<T, Q, S>): void;
}
interface UndoableOptions {
    controller?: boolean | UndoableCommandController;
    strict?: boolean;
}
declare module '..' {
    interface Options extends UndoableOptions {
    }
}
export declare class UndoableCommand<T = any, Q = void> extends Command<UndoableResult<T, Q>> {
}
export declare const undoableCommand: <Strict extends boolean = true>(controller?: UndoableCommandController<Strict>) => Plugin<Command, UndoableCommand, Options, UndoableOptions>;
export {};
