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