import { Dispatch, SetStateAction } from 'react'; import { StorageObj } from './common'; declare function useStorageState(storage: StorageObj, key: string, defaultState: S | (() => S)): [S, Dispatch>, Error | undefined]; declare function useStorageState(storage: StorageObj, key: string): [S | null, Dispatch>, Error | undefined]; export default useStorageState;