import { ConfigurableFlush, RemovableRef, MaybeRefOrGetter } from '@vueuse/shared'; import { Ref } from 'vue-demi'; interface UseIDBOptions extends ConfigurableFlush { /** * Watch for deep changes * * @default true */ deep?: boolean; /** * On error callback * * Default log error to `console.error` */ onError?: (error: unknown) => void; /** * Use shallow ref as reference * * @default false */ shallow?: boolean; /** * Write the default value to the storage when it does not exist * * @default true */ writeDefaults?: boolean; } interface UseIDBKeyvalReturn { data: RemovableRef; isFinished: Ref; set: (value: T) => Promise; } /** * * @param key * @param initialValue * @param options */ declare function useIDBKeyval(key: IDBValidKey, initialValue: MaybeRefOrGetter, options?: UseIDBOptions): UseIDBKeyvalReturn; export { type UseIDBKeyvalReturn, type UseIDBOptions, useIDBKeyval };