From 8bff72b961817108c3c434e1f69cfd7c284ff27f Mon Sep 17 00:00:00 2001 From: Xiaoji Chen Date: Sat, 7 Dec 2024 22:32:55 -0800 Subject: [PATCH] Lint --- src/event-manager.ts | 2 +- src/types.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/event-manager.ts b/src/event-manager.ts index 37c79cc..504eccc 100644 --- a/src/event-manager.ts +++ b/src/event-manager.ts @@ -250,7 +250,7 @@ export class EventManager { opts = handler; // If `event` is a map, call `on()` for each entry. for (const [eventName, eventHandler] of Object.entries(event)) { - this._addEventHandler(eventName, eventHandler!, opts, once, passive); + this._addEventHandler(eventName, eventHandler, opts, once, passive); } return; } diff --git a/src/types.ts b/src/types.ts index 972a0d1..2f84cbc 100644 --- a/src/types.ts +++ b/src/types.ts @@ -77,7 +77,9 @@ export type MjolnirEvent = | MjolnirWheelEvent | MjolnirKeyEvent; -export type MjolnirEventHandler = (event: EventT) => void; +export type MjolnirEventHandler = ( + event: EventT +) => void; export type MjolnirEventHandlers = { [type: string]: MjolnirEventHandler;