react-indexeddb-toolkit
Version:
A complete TypeScript toolkit for IndexedDB in React applications
15 lines (14 loc) • 421 B
TypeScript
import { DBConfig } from "./types";
export declare class IndexedDBManager<T = any> {
private db;
private readonly config;
private readonly storeName;
constructor(config: DBConfig);
init(): Promise<void>;
private getStore;
save(data: T): Promise<void>;
getAll(): Promise<T[]>;
getById(id: string): Promise<T | null>;
delete(id: string): Promise<void>;
clear(): Promise<void>;
}