From 8aef798df7cb493802072c294840092167602fe2 Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Sun, 29 Dec 2024 18:35:44 +0100 Subject: [PATCH] chore(deps): update types to 3.1.0 --- package.json | 2 +- src/helpers/dialog.ts | 4 ++-- src/helpers/progressWindow.ts | 2 +- src/managers/fieldHook.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 7bcb4c2..f7435f9 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "update-deps": "npm update --save" }, "peerDependencies": { - "zotero-types": "^3.0.10" + "zotero-types": "^3.1.0" }, "devDependencies": { "@antfu/eslint-config": "^3.12.1", diff --git a/src/helpers/dialog.ts b/src/helpers/dialog.ts index d31263e..9057347 100644 --- a/src/helpers/dialog.ts +++ b/src/helpers/dialog.ts @@ -549,9 +549,9 @@ const style = ` interface DialogData { [key: string | number | symbol]: any; - loadLock?: _ZoteroTypes.PromiseObject; + loadLock?: _ZoteroTypes.Promise.PromiseObject; loadCallback?: () => void; - unloadLock?: _ZoteroTypes.PromiseObject; + unloadLock?: _ZoteroTypes.Promise.PromiseObject; unloadCallback?: () => void; beforeUnloadCallback?: () => void; l10nFiles?: string | string[]; diff --git a/src/helpers/progressWindow.ts b/src/helpers/progressWindow.ts index 160e96d..4368f67 100644 --- a/src/helpers/progressWindow.ts +++ b/src/helpers/progressWindow.ts @@ -47,7 +47,7 @@ const icons: { [key: string | number]: string } = { */ export class ProgressWindowHelper { win: Zotero.ProgressWindow; - private lines: Zotero.ItemProgress[]; + private lines: _ZoteroTypes.ItemProgress[]; private closeTime: number | undefined; /** diff --git a/src/managers/fieldHook.ts b/src/managers/fieldHook.ts index c529005..60666e1 100644 --- a/src/managers/fieldHook.ts +++ b/src/managers/fieldHook.ts @@ -31,7 +31,7 @@ export class FieldHookManager extends ManagerTool { for (const type of Object.keys(this.patchHelpers) as Array) { const helper = this.patchHelpers[type]; helper.setData({ - target: this.getGlobal("Zotero").Item.prototype as typeof Zotero.Item, + target: this.getGlobal("Zotero").Item.prototype, funcSign: type, patcher: (original) => function (field: string | number, ...args: any[]) {