import type { NextState } from '../util/resolve-hook-state.js'; export type UseStorageValueOptions = { /** * Value to return if `key` is not present in LocalStorage. * * @default undefined */ defaultValue?: T; /** * Fetch storage value on first render. If set to `false` will make the hook yield `undefined` on * first render and defer fetching of the value until effects are executed. * * @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: T) => string | null; }; type UseStorageValueValue = U; export type UseStorageValueResult = { value: UseStorageValueValue; set: (value: NextState>) => void; remove: () => void; fetch: () => void; }; export declare function useStorageValue(storage: Storage, key: string, options?: UseStorageValueOptions): UseStorageValueResult; export {};