import type { DBSchema, IDBPCursor, IDBPCursorWithValue, IDBPDatabase, IDBPIndex, IDBPObjectStore, IDBPTransaction, StoreNames } from './entry.js'; export declare class UpdateEvent extends Event { readonly impactedStores: string[]; constructor(impactedStores: string[]); } export declare const reverseTransformCache: WeakMap; export declare function replaceTraps(callback: (currentTraps: ProxyHandler) => ProxyHandler): void; interface Change { operation: 'add' | 'put' | 'delete'; storeName: StoreNames; key: any; value?: any; } declare type ChangeHandler = (tx: IDBPTransaction[], 'readwrite'>, change: Change) => Promise; export declare function isComputedStore(storeName: string): boolean; export declare function createComputedStore(db: IDBPDatabase, computedStoreName: StoreNames, mainStoreName: StoreNames, secondaryStoreNames: Array>, onChange: ChangeHandler): Promise; /** * Enhance an IDB object with helpers. * * @param value The thing to enhance. */ export declare function wrap(value: IDBDatabase): IDBPDatabase; export declare function wrap(value: IDBIndex): IDBPIndex; export declare function wrap(value: IDBObjectStore): IDBPObjectStore; export declare function wrap(value: IDBTransaction): IDBPTransaction; export declare function wrap(value: IDBOpenDBRequest): Promise; export declare function wrap(value: IDBRequest): Promise; /** * Revert an enhanced IDB object to a plain old miserable IDB one. * * Will also revert a promise back to an IDBRequest. * * @param value The enhanced object to revert. */ interface Unwrap { (value: IDBPCursorWithValue): IDBCursorWithValue; (value: IDBPCursor): IDBCursor; (value: IDBPDatabase): IDBDatabase; (value: IDBPIndex): IDBIndex; (value: IDBPObjectStore): IDBObjectStore; (value: IDBPTransaction): IDBTransaction; (value: Promise>): IDBOpenDBRequest; (value: Promise): IDBOpenDBRequest; (value: Promise): IDBRequest; } export declare const unwrap: Unwrap; export {};