Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch zotero-types@2.2.1 for the project I'm working on.
Zotero.DB.executeTransaction() accepts options, but they were all required even if one wanted to set only a single one. After checking in the Zotero source, all these options are individually checked against a fallback, so we don't have to provide all of them every time. Also fixes a typo in one of the option names.
diff --git a/node_modules/zotero-types/types/xpcom/db.d.ts b/node_modules/zotero-types/types/xpcom/db.d.ts
index 78dd71d..0f1f9d2 100644
--- a/node_modules/zotero-types/types/xpcom/db.d.ts
+++ b/node_modules/zotero-types/types/xpcom/db.d.ts
@@ -56,7 +56,7 @@ declare namespace _ZoteroTypes {
* transaction and re-enable after. (`PRAGMA foreign_keys=0|1` is a no-op during a transaction.)
* @return {Promise} - Promise for result of generator function
*/
- executeTransaction<T>(func: () => T | Promise<T>, options?: {disbledForeignKeys: boolean, timeout: number, vacuumOnCommit: boolean, inBackup: boolean, onCommit: (id: string) => void, onRollback: (id: string) => void}): Promise<T>;
+ executeTransaction<T>(func: () => T | Promise<T>, options?: {disableForeignKeys?: boolean, waitTimeout?: number, vacuumOnCommit?: boolean, inBackup?: boolean, onCommit?: (id: string) => void, onRollback?: (id: string) => void}): Promise<T>;
inTransaction(): boolean;
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
zotero-types@2.2.1
for the project I'm working on.Zotero.DB.executeTransaction()
accepts options, but they were all required even if one wanted to set only a single one. After checking in the Zotero source, all these options are individually checked against a fallback, so we don't have to provide all of them every time. Also fixes a typo in one of the option names.This issue body was partially generated by patch-package.