UNPKG

3.06 kBTypeScriptView Raw
1export function rtop(request: IDBRequest): Promise<any>;
2export function openDB(name: string, initDB: (arg0: IDBDatabase) => any): Promise<IDBDatabase>;
3export function deleteDB(name: string): Promise<any>;
4export function createStores(db: IDBDatabase, definitions: Array<Array<string> | Array<string | IDBObjectStoreParameters | undefined>>): void;
5export function transact(db: IDBDatabase, stores: Array<string>, access?: "readonly" | "readwrite" | undefined): Array<IDBObjectStore>;
6export function count(store: IDBObjectStore, range?: IDBKeyRange | undefined): Promise<number>;
7export function get(store: IDBObjectStore, key: string | number | ArrayBuffer | Date | Array<any>): Promise<string | number | ArrayBuffer | Date | Array<any>>;
8export function del(store: IDBObjectStore, key: string | number | ArrayBuffer | Date | IDBKeyRange | Array<any>): Promise<any>;
9export function put(store: IDBObjectStore, item: string | number | ArrayBuffer | Date | boolean, key?: string | number | any[] | Date | ArrayBuffer | undefined): Promise<any>;
10export function add(store: IDBObjectStore, item: string | number | ArrayBuffer | Date | boolean, key: string | number | ArrayBuffer | Date | Array<any>): Promise<any>;
11export function addAutoKey(store: IDBObjectStore, item: string | number | ArrayBuffer | Date): Promise<number>;
12export function getAll(store: IDBObjectStore, range?: IDBKeyRange | undefined, limit?: number | undefined): Promise<Array<any>>;
13export function getAllKeys(store: IDBObjectStore, range?: IDBKeyRange | undefined, limit?: number | undefined): Promise<Array<any>>;
14export function queryFirst(store: IDBObjectStore, query: IDBKeyRange | null, direction: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<any>;
15export function getLastKey(store: IDBObjectStore, range?: IDBKeyRange | null | undefined): Promise<any>;
16export function getFirstKey(store: IDBObjectStore, range?: IDBKeyRange | null | undefined): Promise<any>;
17export function getAllKeysValues(store: IDBObjectStore, range?: IDBKeyRange | undefined, limit?: number | undefined): Promise<Array<KeyValuePair>>;
18export function iterate(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any, arg1: any) => void | boolean | Promise<void | boolean>, direction?: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<void>;
19export function iterateKeys(store: IDBObjectStore, keyrange: IDBKeyRange | null, f: (arg0: any) => void | boolean | Promise<void | boolean>, direction?: 'next' | 'prev' | 'nextunique' | 'prevunique'): Promise<void>;
20export function getStore(t: IDBTransaction, store: string): IDBObjectStore;
21export function createIDBKeyRangeBound(lower: any, upper: any, lowerOpen: boolean, upperOpen: boolean): IDBKeyRange;
22export function createIDBKeyRangeUpperBound(upper: any, upperOpen: boolean): IDBKeyRange;
23export function createIDBKeyRangeLowerBound(lower: any, lowerOpen: boolean): IDBKeyRange;
24export type KeyValuePair = {
25 /**
26 * key
27 */
28 k: any;
29 /**
30 * Value
31 */
32 v: any;
33};
34//# sourceMappingURL=indexeddb.d.ts.map
\No newline at end of file