I'm working with a function that requires the argument
event: MouseEvent
If I try to access
event.srcElement.innerText;
the error message pops up saying
[ts] Property 'innerText' does not exist on type 'Element'.
even though the property exists.
Is there a way to add the innerText
property to MouseEvent
without having to create a new class that extends MouseEvent
?