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.

22 lines (21 loc) 905 B
import { IndexInterface, KeyCursorInterface, ObjectStoreInterface } from '../component/interface/components.interface.js'; export declare class KeyCursor<PK extends IDBValidKey, K extends IDBValidKey> implements KeyCursorInterface<PK, K> { private readonly ctx; protected _cursor: IDBCursor | null; protected _cursorPromise: Promise<IDBCursor | null>; constructor(ctx: { request: IDBRequest<IDBCursor | null>; direction: IDBCursorDirection; source: ObjectStoreInterface | IndexInterface; }); get request(): IDBRequest<IDBCursor>; get key(): K; get primaryKey(): PK | undefined; get direction(): IDBCursorDirection; get source(): ObjectStoreInterface | IndexInterface; end(): Promise<boolean>; continue(key?: K | PK): void; advance(count: number): void; continuePrimaryKey(key: K, primaryKey: PK): void; private stepUp; }