How to fix property not existing on EventTarget in TypeScript Find out why this TypeScript error occurs and how to fix it by making TypeScript understand the correct type for EventTarget