I
History
testedUndo/redo stacks of inverse-step entries. Borrows the ergonomics of stdlib's command history (bounded size, redo cleared on a new edit) but stores data (inverse steps) rather than closures — which is what makes it serializable and collab-friendly.
Signature
ts
interface HistoryProperties
| Property | Type | Description |
|---|---|---|
record | (entry: HistoryEntry) => void | Record a new edit, clearing the redo stack. |
undo | () => HistoryEntry | undefined | Pop the latest undo entry (and push it onto the redo stack). |
redo | () => HistoryEntry | undefined | Pop the latest redo entry (and push it back onto the undo stack). |
canUndo | () => boolean | — |
canRedo | () => boolean | — |
clear | () => void | — |