import { Key } from "./indexed-db"; export interface IndexedDBProps { name: string; version: number; objectStoresMeta: ObjectStoreMeta[]; } export interface ObjectStoreMeta { store: string; storeConfig: { keyPath: string; autoIncrement: boolean; [key: string]: any; }; storeSchema: ObjectStoreSchema[]; } export interface ObjectStoreSchema { name: string; keypath: string; options: { unique: boolean; [key: string]: any; }; } export interface useIndexedDB { dbName: string; version: number; objectStore: string; } export declare function initDB({ name, version, objectStoresMeta }: IndexedDBProps): void; export declare function useIndexedDB(objectStore: string): { add: (value: T, key?: any) => Promise; getByID: (id: number | string) => Promise; getAll: () => Promise; update: (value: T, key?: any) => Promise; deleteRecord: (key: Key) => Promise; openCursor: (cursorCallback: (event: Event) => void, keyRange?: IDBKeyRange) => Promise; getByIndex: (indexName: string, key: any) => Promise; clear: () => Promise; };