import { Context } from '../../internal.js'; export declare const globalIDB: any; export declare function isAbortError(err: unknown): boolean; export declare function storeRequestPromise(request: IDBRequest): Promise; export declare function cursorIterator(request: IDBRequest, callback: (value: T | null) => boolean): Promise; export declare function getSizeOfObjectStore(database: IDBDatabase, storeName: string): Promise<{ count: number; size: number; }>; export declare function getSizesOfAllObjectStores(database: IDBDatabase): Promise<{ [storeName: string]: { count: number; size: number; }; }>; export declare function getAllFromObjectStores(db: IDBDatabase, stores: string[]): Promise; export declare function closeDatabase(db: IDBDatabase): Promise; export declare function deleteAllDatabases(namespace: string, environment: Context['environment']): Promise; export declare function deleteDatabase(name: string, indexedDB?: IDBFactory): Promise; export declare function getAllDatabaseNamesAndVersions(indexedDB?: IDBFactory): Promise; export declare function createAbortableTransaction(db: IDBDatabase, storeNames: string[], mode: 'readonly' | 'readwrite', abortSignal?: AbortSignal, log?: (...args: any[]) => void): IDBTransaction; export declare function isTransactionAborted(tx: IDBTransaction): any; /** * Deletes any existing database with name `toName` and * copies the index structure and all data * from `from` to a new database. * * Does NOT run Verdant migrations. Use to copy existing * data as-is. */ export declare function overwriteDatabase(from: IDBDatabase, toName: string, ctx: Pick, indexedDB?: IDBFactory): Promise; export declare function openDatabase(name: string, expectedVersion: number, indexedDB?: IDBFactory): Promise; export declare function getMetadataDbName(namespace: string): string; export declare function getDocumentDbName(namespace: string): string; export declare function getNamespaceFromDatabaseInfo(info: IDBDatabaseInfo): string | undefined;