UNPKG

@frauschert/yas

Version:

Yet Another State - A lightweight and type-safe state management solution for React

11 lines (10 loc) 355 B
import { Store } from './store'; interface UndoableStore<T> extends Store<T> { undo: () => void; redo: () => void; canUndo: () => boolean; canRedo: () => boolean; clearHistory: () => void; } export declare function makeUndoable<T extends Record<string, unknown>>(store: Store<T>, maxHistorySize?: number): UndoableStore<T>; export {};