From b0010ee8c7746c419a3aed17f79db296bf028ca0 Mon Sep 17 00:00:00 2001 From: Linxzh Date: Fri, 3 Mar 2023 15:08:13 +0800 Subject: [PATCH] fix: Update type in hooks, match the variable types between examples.ts and hooks.ts --- src/hooks.ts | 2 +- src/modules/examples.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks.ts b/src/hooks.ts index c8e8fe3..ef7f161 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -91,7 +91,7 @@ function onShutdown(): void { async function onNotify( event: string, type: string, - ids: Array, + ids: Array | Array, extraData: { [key: string]: any } ) { // You can add your code to the corresponding notify type diff --git a/src/modules/examples.ts b/src/modules/examples.ts index 63e2bf3..b780884 100644 --- a/src/modules/examples.ts +++ b/src/modules/examples.ts @@ -33,7 +33,7 @@ export class BasicExampleFactory { this.unregisterNotifier(notifierID); return; } - addon.hooks.onNotify(event, type, ids as string[], extraData); + addon.hooks.onNotify(event, type, ids, extraData); }, };