UNPKG

@tanstack/offline-transactions

Version:

Offline-first transaction capabilities for TanStack DB

23 lines (22 loc) 742 B
import { BaseStorageAdapter } from './StorageAdapter.js'; export declare class IndexedDBAdapter extends BaseStorageAdapter { private dbName; private storeName; private db; constructor(dbName?: string, storeName?: string); /** * Probe IndexedDB availability by attempting to open a test database. * This catches private mode and other restrictions that block IndexedDB. */ static probe(): Promise<{ available: boolean; error?: Error; }>; private openDB; private getStore; get(key: string): Promise<string | null>; set(key: string, value: string): Promise<void>; delete(key: string): Promise<void>; keys(): Promise<Array<string>>; clear(): Promise<void>; }