export interface Actions { set: (newPresent: T, checkpoint?: boolean) => void; reset: (newPresent: T) => void; undo: () => void; redo: () => void; canUndo: boolean; canRedo: boolean; } export interface State { past: T[]; present: T; future: T[]; } declare type Options = { useCheckpoints?: boolean; }; export declare const useUndo: (initialPresent: T, opts?: Options) => [State, Actions]; export default useUndo;