json-joy
Version:
Collection of libraries for building collaborative editing apps.
17 lines (16 loc) • 505 B
TypeScript
import type { UndoManager, UndoItem } from '../../../types';
import type { UiLifeCycles } from '../../types';
/**
* A Memory-based undo manager.
*/
export declare class MemoryUndo implements UndoManager, UiLifeCycles {
/** Undo stack. */
uStack: UndoItem[];
/** Redo stack. */
rStack: UndoItem[];
push<U, R>(undo: UndoItem<U, R>): void;
undo(): void;
redo(): void;
/** -------------------------------------------------- {@link UiLifeCycles} */
start(): () => void;
}