import type { LogContext } from '@rocicorp/logger'; import type { Read, Store, Write } from './store.ts'; /** * This store uses an {@link IDBStore} by default. If the {@link IDBStore} fails * to open the DB with an exception that matches * {@link isFirefoxPrivateBrowsingError} we switch out the implementation to use * a {@link MemStore} instead. * * The reason this is relatively complicated is that when {@link IDBStore} is * created, it calls `openDatabase` synchronously, but that returns a `Promise` * that will reject in the case of Firefox private browsing. We don't await this * promise until we call `read` or `write` so we cannot do the switch until * then. */ export declare class IDBStoreWithMemFallback implements Store { #private; constructor(lc: LogContext, name: string); read(): Promise; write(): Promise; close(): Promise; get closed(): boolean; } export declare function newIDBStoreWithMemFallback(lc: LogContext, name: string): Store; export declare function dropIDBStoreWithMemFallback(name: string): Promise; //# sourceMappingURL=idb-store-with-mem-fallback.d.ts.map