/** * Generic undo stack with clone-on-push semantics. * * Stores deep clones of state snapshots. Popped snapshots are returned * directly (no re-cloning) since they are already detached. */ /** * [WHO]: UndoStack * [FROM]: No external dependencies * [TO]: Consumed by core/lib/tui/src/index.ts * [HERE]: core/lib/tui/src/undo-stack.ts - */ export declare class UndoStack { private stack; /** Push a deep clone of the given state onto the stack. */ push(state: S): void; /** Pop and return the most recent snapshot, or undefined if empty. */ pop(): S | undefined; /** Remove all snapshots. */ clear(): void; get length(): number; }