Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
jakearchibald committed Jan 6, 2021
1 parent d475483 commit 12af971
Show file tree
Hide file tree
Showing 17 changed files with 145 additions and 123 deletions.
2 changes: 1 addition & 1 deletion build/cjs/database-extras.js.map

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

102 changes: 53 additions & 49 deletions build/cjs/entry.d.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/cjs/entry.d.ts.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/cjs/entry.js.map

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

13 changes: 9 additions & 4 deletions build/cjs/index.js
Expand Up @@ -69,10 +69,15 @@ function getMethod(target, prop) {
let target = tx.store;
if (useIndex)
target = target.index(args.shift());
const returnVal = await target[targetFuncName](...args);
if (isWrite)
await tx.done;
return returnVal;
// Must reject if op rejects.
// If it's a write operation, must reject if tx.done rejects.
// Must reject with op rejection first.
// Must resolve with op value.
// Must handle both promises (no unhandled rejections)
return (await Promise.all([
target[targetFuncName](...args),
isWrite && tx.done,
]))[0];
};
cachedMethods.set(prop, method);
return method;
Expand Down
6 changes: 3 additions & 3 deletions build/cjs/wrap-idb-value.d.ts
Expand Up @@ -20,12 +20,12 @@ export declare function wrap<T>(value: IDBRequest<T>): Promise<T>;
* @param value The enhanced object to revert.
*/
interface Unwrap {
(value: IDBPCursorWithValue<any, any, any, any>): IDBCursorWithValue;
(value: IDBPCursor<any, any, any, any>): IDBCursor;
(value: IDBPCursorWithValue<any, any, any, any, any>): IDBCursorWithValue;
(value: IDBPCursor<any, any, any, any, any>): IDBCursor;
(value: IDBPDatabase): IDBDatabase;
(value: IDBPIndex<any, any, any, any>): IDBIndex;
(value: IDBPObjectStore<any, any, any>): IDBObjectStore;
(value: IDBPTransaction<any, any>): IDBTransaction;
(value: IDBPTransaction<any, any, any>): IDBTransaction;
<T extends any>(value: Promise<IDBPDatabase<T>>): IDBOpenDBRequest;
(value: Promise<IDBPDatabase>): IDBOpenDBRequest;
<T>(value: Promise<T>): IDBRequest<T>;
Expand Down
2 changes: 1 addition & 1 deletion build/cjs/wrap-idb-value.d.ts.map

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

2 changes: 1 addition & 1 deletion build/esm/database-extras.js.map

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

0 comments on commit 12af971

Please sign in to comment.