import { type NextState } from '../util/resolveHookState.js';
export type UseStorageValueOptions<T, InitializeWithValue extends boolean | undefined> = {
    defaultValue?: T;
    initializeWithValue?: InitializeWithValue;
    parse?: (str: string | null, fallback: T | null) => T | null;
    stringify?: (data: T) => string | null;
};
type UseStorageValueValue<Type, Default extends Type = Type, Initialize extends boolean | undefined = boolean | undefined, N = Default extends null | undefined ? null | Type : Type, U = Initialize extends false ? undefined | N : N> = U;
export type UseStorageValueResult<Type, Default extends Type = Type, Initialize extends boolean | undefined = boolean | undefined> = {
    value: UseStorageValueValue<Type, Default, Initialize>;
    set: (value: NextState<Type, UseStorageValueValue<Type, Default, Initialize>>) => void;
    remove: () => void;
    fetch: () => void;
};
export declare function useStorageValue<Type, Default extends Type = Type, Initialize extends boolean | undefined = boolean | undefined>(storage: Storage, key: string, options?: UseStorageValueOptions<Type, Initialize>): UseStorageValueResult<Type, Default, Initialize>;
export {};
