@instantdb/core
Version:
Instant's core local abstraction
18 lines • 793 B
TypeScript
import { StoreInterface, StoreInterfaceStoreName } from './utils/PersistedObject.ts';
export default class IndexedDBStorage extends StoreInterface {
dbName: string;
_storeName: StoreInterfaceStoreName;
_appId: string;
_prefix: string;
_dbPromise: Promise<IDBDatabase>;
constructor(appId: string, storeName: StoreInterfaceStoreName);
_init(): Promise<IDBDatabase>;
_upgradeStore(event: IDBVersionChangeEvent): void;
_withRetry<T>(fn: (db: IDBDatabase) => Promise<T>): Promise<T>;
getItem(k: string): Promise<any>;
setItem(k: string, v: any): Promise<void>;
multiSet(keyValuePairs: Array<[string, any]>): Promise<void>;
removeItem(k: string): Promise<void>;
getAllKeys(): Promise<string[]>;
}
//# sourceMappingURL=IndexedDBStorage.d.ts.map