import { TreeState, TreeStateSnapshot } from "./TreeState.js"; export interface History { readonly past: readonly TSnapshot[]; readonly future: readonly TSnapshot[]; } export type HistoryWithState = { readonly history: History; readonly state: TreeState; }; export declare function createHistory(initial: TreeState): History; export declare function record(history: History, state: TreeState): History; export declare function canUndo(history: History): boolean; export declare function canRedo(history: History): boolean; export declare function undo(history: History): HistoryWithState | null; export declare function redo(history: History): HistoryWithState | null;