diff options
Diffstat (limited to 'packages/idb-bridge/src')
-rw-r--r-- | packages/idb-bridge/src/idbtypes.ts | 5 | ||||
-rw-r--r-- | packages/idb-bridge/src/util/validateKeyPath.ts | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/packages/idb-bridge/src/idbtypes.ts b/packages/idb-bridge/src/idbtypes.ts index fe9003d6d..5fc58e88b 100644 --- a/packages/idb-bridge/src/idbtypes.ts +++ b/packages/idb-bridge/src/idbtypes.ts @@ -267,7 +267,7 @@ export interface IDBCursor { /** * Returns the IDBObjectStore or IDBIndex the cursor was opened from. */ - readonly source: IDBObjectStore | IDBIndex; + readonly source: IDBObjectStore | IDBIndex | IDBCursor; /** * Advances the cursor through the next count records in range. */ @@ -820,7 +820,7 @@ export interface IDBTransaction extends EventTarget { /** * If the transaction was aborted, returns the error (a DOMException) providing the reason. */ - readonly error: DOMException; + readonly error: DOMException | null; /** * Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */ @@ -836,6 +836,7 @@ export interface IDBTransaction extends EventTarget { * Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted. */ abort(): void; + commit(): void; /** * Returns an IDBObjectStore in the transaction's scope. */ diff --git a/packages/idb-bridge/src/util/validateKeyPath.ts b/packages/idb-bridge/src/util/validateKeyPath.ts index 3bbe653b6..8c29c1d57 100644 --- a/packages/idb-bridge/src/util/validateKeyPath.ts +++ b/packages/idb-bridge/src/util/validateKeyPath.ts @@ -46,7 +46,7 @@ export const validateKeyPath = ( if (myKeyPath.length >= 1 && validIdentifierRegex.test(myKeyPath)) { return; } - } catch (err) { + } catch (err: any) { throw new SyntaxError(err.message); } if (myKeyPath.indexOf(" ") >= 0) { |