import { Dispatch, SetStateAction } from 'react';

type SetValue<T> = Dispatch<SetStateAction<T>>;
type UseLocalStorageResult<T> = {
    value: T;
    setValue: SetValue<T>;
    deleteValue: () => void;
};
/**
 * @param key Key under which to save the data
 * @param backupValue Used if the storage is unavailable or no value is present
 *
 * The backup value will never be saved to the storage unless you explicitly
 */
declare const useLocalStorage: <T>(key: string, backupValue: T) => UseLocalStorageResult<T>;

export { useLocalStorage };
