fix: update type error in template code

This commit is contained in:
Linxzh 2023-03-03 09:46:53 +08:00
parent c4777e35a9
commit 833a7ee8ec

View File

@ -26,14 +26,14 @@ export class BasicExampleFactory {
notify: async ( notify: async (
event: string, event: string,
type: string, type: string,
ids: Array<string>, ids: number[] | string[],
extraData: { [key: string]: any } extraData: { [key: string]: any }
) => { ) => {
if (!addon?.data.alive) { if (!addon?.data.alive) {
this.unregisterNotifier(notifierID); this.unregisterNotifier(notifierID);
return; return;
} }
addon.hooks.onNotify(event, type, ids, extraData); addon.hooks.onNotify(event, type, ids as string[], extraData);
}, },
}; };