MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / willRevert

Method willRevert

src/actions/Clear.ts:31–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 }
30
31 override async willRevert(): Promise<void> {
32 if (this.engine.history('clear').length > 0) {
33 return;
34 }
35
36 throw new Error('No items left on the clear history to revert it.');
37 }
38
39 override async revert(): Promise<void> {
40 const last = this.engine.history('clear').pop();

Callers

nothing calls this directly

Calls 1

historyMethod · 0.80

Tested by

no test coverage detected