export declare function promisifyRequest(request: IDBRequest | IDBTransaction): Promise; export declare function createStore(dbName: string, storeName: string): UseStore; export declare type UseStore = (txMode: IDBTransactionMode, callback: (store: IDBObjectStore) => T | PromiseLike) => Promise; /** * Get a value by its key. * * @param key * @param customStore Method to get a custom store. Use with caution (see the docs). */ export declare function get(key: IDBValidKey, customStore?: UseStore): Promise; /** * Set a value with a key. * * @param key * @param value * @param customStore Method to get a custom store. Use with caution (see the docs). */ export declare function set(key: IDBValidKey, value: any, customStore?: UseStore): Promise; /** * Set multiple values at once. This is faster than calling set() multiple times. * It's also atomic – if one of the pairs can't be added, none will be added. * * @param entries Array of entries, where each entry is an array of `[key, value]`. * @param customStore Method to get a custom store. Use with caution (see the docs). */ export declare function setMany(entries: [IDBValidKey, any][], customStore?: UseStore): Promise; /** * Get multiple values by their keys * * @param keys * @param customStore Method to get a custom store. Use with caution (see the docs). */ export declare function getMany(keys: IDBValidKey[], customStore?: UseStore): Promise; /** * Update a value. This lets you see the old value and update it as an atomic operation. * * @param key * @param updater A callback that takes the old value and returns a new value. * @param customStore Method to get a custom store. Use with caution (see the docs). */ export declare function update(key: IDBValidKey, updater: (oldValue: T | undefined) => T, customStore?: UseStore): Promise; /** * Delete a particular key from the store. * * @param key * @param customStore Method to get a custom store. Use with caution (see the docs). */ export declare function del(key: IDBValidKey, customStore?: UseStore): Promise; /** * Delete multiple keys at once. * * @param keys List of keys to delete. * @param customStore Method to get a custom store. Use with caution (see the docs). */ export declare function delMany(keys: IDBValidKey[], customStore?: UseStore): Promise; /** * Clear all values in the store. * * @param customStore Method to get a custom store. Use with caution (see the docs). */ export declare function clear(customStore?: UseStore): Promise; /** * Get all keys in the store. * * @param customStore Method to get a custom store. Use with caution (see the docs). */ export declare function keys(customStore?: UseStore): Promise; /** * Get all values in the store. * * @param customStore Method to get a custom store. Use with caution (see the docs). */ export declare function values(customStore?: UseStore): Promise; /** * Get all entries in the store. Each entry is an array of `[key, value]`. * * @param customStore Method to get a custom store. Use with caution (see the docs). */ export declare function entries(customStore?: UseStore): Promise<[KeyType, ValueType][]>;