From d434275d7db041c77329f01885dcadf3e53fdb3f Mon Sep 17 00:00:00 2001 From: "ala'n (Alexey Stsefanovich)" Date: Tue, 28 Mar 2023 00:50:10 +0200 Subject: [PATCH] fix(esl-event-listener): fix typechecking for TS5 --- src/modules/esl-event-listener/core/listener.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/esl-event-listener/core/listener.ts b/src/modules/esl-event-listener/core/listener.ts index 1f4e63b99..0e4c28ae5 100644 --- a/src/modules/esl-event-listener/core/listener.ts +++ b/src/modules/esl-event-listener/core/listener.ts @@ -68,7 +68,7 @@ export class ESLEventListener implements ESLListenerDefinition, EventListenerObj const target = resolveProperty(this.target, this.host); if (isObject(target)) return wrap(target); const $host = '$host' in this.host ? this.host.$host : this.host; - if (typeof target === 'string') return ESLTraversingQuery.all(target, $host); + if (typeof target === 'string') return ESLTraversingQuery.all(target, $host as any); if (typeof target === 'undefined' && $host instanceof HTMLElement) return [$host]; return []; } @@ -153,8 +153,8 @@ export class ESLEventListener implements ESLListenerDefinition, EventListenerObj /** Adds listener to the listener store of the host object */ protected static add(host: object, instance: ESLEventListener): void { if (!isObject(host)) return; - if (!Object.hasOwnProperty.call(host, LISTENERS)) host[LISTENERS] = []; - host[LISTENERS].push(instance); + if (!Object.hasOwnProperty.call(host, LISTENERS)) (host as any)[LISTENERS] = []; + (host as any)[LISTENERS].push(instance); } /** Removes listener from the listener store of the host object */ protected static remove(host: object, instance: ESLEventListener): void {