How izure1/undoit works
Undoit is a small TypeScript undo/redo library. Callers submit actions to synchronous or asynchronous history managers; actions invoke paired do/undo callbacks, and the managers maintain undo and redo stacks. StateHistory wraps the synchronous manager to provide push/undo/redo over a value. The README also documents the asynchronous busy-state capability. Edges reflect the supplied source excerpts and README; no external service or persistent store is involved.
Main entry points: index.ts Public exports · UndoRedo.ts Sync manager · AsyncUndoRedo.ts Async manager · StateHistory.ts Value history
Components 9
Action callbacks
- Sync action
src/action/Action.ts - Async action
src/action/AsyncAction.ts - Action callbacks
src/action/DefaultAction.ts
Undo redo
- Sync manager
src/execute/UndoRedo.ts - Async manager
src/execute/AsyncUndoRedo.ts - Stack storage
src/execute/DefaultUndoRedo.ts
State history
- Value history
src/helpers/StateHistory.ts
Other components
- Library caller
- Public exports
src/index.ts
Connections 17
- Library caller → Public exports: imports API
README.md - Public exports → Sync action: exports
src/index.ts - Public exports → Async action: exports
src/index.ts - Public exports → Sync manager: exports
src/index.ts - Public exports → Async manager: exports
src/index.ts - Public exports → Value history: exports
src/index.ts - Sync action → Action callbacks: extends
src/action/Action.ts - Async action → Action callbacks: extends
src/action/AsyncAction.ts - Sync manager → Stack storage: extends
src/execute/UndoRedo.ts - Async manager → Stack storage: extends
src/execute/AsyncUndoRedo.ts - Sync manager → Sync action: executes callbacks
src/execute/UndoRedo.ts - Async manager → Async action: awaits callbacks
src/execute/AsyncUndoRedo.ts - Value history → Sync manager: delegates history
src/helpers/StateHistory.ts - Value history → Sync action: creates actions
src/helpers/StateHistory.ts - Library caller → Sync manager: submits actions
README.md - Library caller → Async manager: submits async actions
README.md - Library caller → Value history: changes values
README.md