UNPKG

@idxdb/promised

Version:

@idxdb/promised wraps the IndexedDB API. It allows you to easily store and retrieve data in an indexed db database using async/await syntax, making it easier to integrate with your existing codebase.

13 lines (12 loc) 598 B
import { DatabaseInterface, ObjectStoreInterface, TransactionInterface } from '../component/interface/components.interface.js'; export declare class Database implements DatabaseInterface { private readonly ctx; constructor(ctx: { db: IDBDatabase; }); close(): void; createObjectStore(name: string, options?: IDBObjectStoreParameters): ObjectStoreInterface; deleteObjectStore(name: string): void; transaction(storeNames: string | string[], mode?: IDBTransactionMode, options?: IDBTransactionOptions): TransactionInterface; get objectStoreNames(): string[]; }