Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion packages/core/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,21 @@ export function createHistory({ size = 30, coalesce = true }: HistoryOptions) {
/**
* Maximum number of commands in the history.
*/
size,
get size() {
return size
},
/**
* Curren number of Undo commands in the stack
*/
get undoLength() {
return undoStack.length
},
/**
* Curren number of Redo commands in the stack
*/
get redoLength() {
return redoStack.length
},
/**
* Whether there are commands available to undo.
*/
Expand Down