Skip to content

Commit

Permalink
minor version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoecklein committed Jul 1, 2023
1 parent 1a08a32 commit c6b96d3
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 22 deletions.
57 changes: 41 additions & 16 deletions dest/idbx.d.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
export declare function open(name: string, version?: number): {
upgrade: (callback: (event: IDBVersionChangeEvent) => void) => void;
blocked: (callback: (event: Event) => void) => void;
ready: Promise<IDBDatabase>;
};
export declare function add<T>(store: IDBObjectStore, item: T, key?: IDBValidKey): Promise<IDBValidKey>;
export declare function asyncRequest<T>(req: IDBRequest<T>): Promise<T>;
export declare function cursorHandler(store: IDBObjectStore, onResult: (cursor: IDBCursorWithValue) => boolean | void, onEnd?: () => void): void;
export declare function add<T>(store: IDBObjectStore, item: T | T[], key?: IDBValidKey): Promise<IDBValidKey>;
/**
* @deprecated Use `add` instead. `addBulk` will be removed in 2.0.0.
*/
export declare function addBulk<T>(store: IDBObjectStore, items?: T[]): Promise<IDBValidKey[]>;
export declare function put<T>(store: IDBObjectStore, item: T, key?: IDBValidKey): Promise<IDBValidKey>;
export declare function putBulk<T>(store: IDBObjectStore, items?: T[]): Promise<IDBValidKey[]>;
export declare function del(store: IDBObjectStore, query: IDBValidKey | IDBKeyRange): Promise<undefined>;
export declare function delBulk(store: IDBObjectStore, keys: Array<IDBValidKey | IDBKeyRange>): Promise<undefined[]>;
export declare function get<T>(store: IDBObjectStore, query: IDBValidKey | IDBKeyRange): Promise<T | undefined>;
export declare function getAll<T>(store: IDBObjectStore, query?: IDBValidKey | IDBKeyRange, count?: number): Promise<T[]>;
export declare function getAllKeys(store: IDBObjectStore, query?: IDBValidKey | IDBKeyRange, count?: number): Promise<IDBValidKey[]>;
export declare function getKey(store: IDBObjectStore, query: IDBValidKey | IDBKeyRange): Promise<IDBValidKey | undefined>;
export declare function clear(store: IDBObjectStore): Promise<undefined>;
export declare function count(store: IDBObjectStore, query?: IDBValidKey | IDBKeyRange): Promise<number>;
interface IDBXAddCommand<T> {
storeName: string;
method: "add";
Expand Down Expand Up @@ -90,3 +80,38 @@ export declare function batch<T>(db: IDBDatabase, commands: IDBXCommand<T>[], mo
completed: Promise<IDBXBatchResultItem<T>[]>;
};
export {};
export declare function clear(store: IDBObjectStore): Promise<undefined>;
export declare function count(store: IDBObjectStore, query?: IDBValidKey | IDBKeyRange): Promise<number>;
export declare function del(store: IDBObjectStore, query: IDBValidKey | IDBKeyRange): Promise<undefined> | Promise<undefined[]>;
/**
* @deprecated Use `del` instead. `delBulk` will be removed in 2.0.0.
*/
export declare function delBulk(store: IDBObjectStore, keys: Array<IDBValidKey | IDBKeyRange>): Promise<(undefined[] | undefined)[]>;
export declare function get<T>(store: IDBObjectStore, query: IDBValidKey | IDBKeyRange): Promise<T | undefined>;
export declare function getAll<T>(store: IDBObjectStore, query?: IDBValidKey | IDBKeyRange, count?: number): Promise<T[]>;
export declare function getAllKeys(store: IDBObjectStore, query?: IDBValidKey | IDBKeyRange, count?: number): Promise<IDBValidKey[]>;
export declare function getKey(store: IDBObjectStore, query: IDBValidKey | IDBKeyRange): Promise<IDBValidKey | undefined>;
export declare function getStore(db: IDBDatabase, storeName: string, mode?: IDBTransactionMode): IDBObjectStore;
export declare function iterate<T>(store: IDBObjectStore): AsyncIterable<T>;
interface IDBXOpenResult {
upgrade: (callback: (event: IDBVersionChangeEvent) => void) => void;
blocked: (callback: (event: Event) => void) => void;
ready: Promise<IDBDatabase>;
}
/**
* @deprecated Use `openDB` instead. `open` will be removed in 2.0.0.
*/
export declare function open(name: string, version?: number): IDBXOpenResult;
export {};
interface IDBXOpenOptions {
version?: number;
upgrade?: (db: IDBDatabase, event: IDBVersionChangeEvent) => void;
blocked?: (event: Event) => void;
}
export declare function openDB(name: string, options?: IDBXOpenOptions): Promise<IDBDatabase>;
export {};
export declare function put<T>(store: IDBObjectStore, item: T, key?: IDBValidKey): Promise<IDBValidKey>;
/**
* @deprecated Use `put` instead. `putBulk` will be removed in 2.0.0.
*/
export declare function putBulk<T>(store: IDBObjectStore, items?: T[]): Promise<IDBValidKey[]>;
2 changes: 1 addition & 1 deletion dest/idbx.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c6b96d3

Please sign in to comment.