import { NextState } from '../util/resolveHookState'; export interface UseStorageValueOptions { /** * Default value that will be used in absence of value in storage. * * @default undefined */ defaultValue?: T; /** * Whether to initialize state with storage value or initialize with `undefined` state. * * @default true */ initializeWithValue?: InitializeWithValue; /** * Custom function to parse storage value with. */ parse?: (str: string | null, fallback: T | null) => T | null; /** * Custom function to stringify value to store with. */ stringify?: (data: unknown) => string | null; } declare type UseStorageValueValue = U; export interface UseStorageValueResult { value: UseStorageValueValue; set: (val: NextState>) => void; remove: () => void; fetch: () => void; } export declare function useStorageValue(storage: Storage, key: string, options?: UseStorageValueOptions): UseStorageValueResult; export {};