Pop and return the last undoable action.
()
| 532 | |
| 533 | /** Pop and return the last undoable action. */ |
| 534 | undo(): EditAction | null { |
| 535 | const action = this.undoStack.pop(); |
| 536 | if (action) { |
| 537 | this.redoStack.push(action); |
| 538 | } |
| 539 | return action ?? null; |
| 540 | } |
| 541 | |
| 542 | /** Pop and return the last redoable action. */ |
| 543 | redo(): EditAction | null { |
no test coverage detected