diff --git a/packages/inferno/src/DOM/events/delegation.ts b/packages/inferno/src/DOM/events/delegation.ts index 6e81dbcd1..a2db5387b 100644 --- a/packages/inferno/src/DOM/events/delegation.ts +++ b/packages/inferno/src/DOM/events/delegation.ts @@ -174,7 +174,7 @@ function extendEventProperties(event): IEventData { return eventData; } -function rootEvent(name: string) { +function rootEvent(name: string): (event: SemiSyntheticEvent) => void { const isClick = name === 'onClick' || name === 'onDblClick'; return function (event: SemiSyntheticEvent) { dispatchEvents(event, isClick, name, extendEventProperties(event)); @@ -185,7 +185,6 @@ function attachEventToDocument( name: string, ): (event: SemiSyntheticEvent) => void { const attachedEvent = rootEvent(name); - // @ts-expect-error TODO: FIXME document.addEventListener(normalizeEventName(name), attachedEvent);