CustomEvents in addEventListener #24
Unanswered
grzegorzkiselev
asked this question in
Questions
Replies: 1 comment 1 reply
-
I don't know if this is what you want, but I wrote up a way in TS (yes, I know this is "types-in-JS", but does importing .d.ts files count?) to somewhat neatly add new event types to classes: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, everybody. I am trying to understand the typing of custom events.
I encountered that I can’t specify “CustomEvent” type in addEventListener without patching TS library. Any ideas what I’m doing wrong?
The next question goes further: what can I get by specifying
@fires
,@listens
tags and declaring events via@event
? Does this give me any hints, or just display information in the popup?Beta Was this translation helpful? Give feedback.
All reactions