Trying to update DocumentEventMap type
See original GitHub issueHello, I am working on adding support for the onvisibilitychange
event listener to the document object in PR #359.
I was wondering how to also add compatibility for
document.addEventListener('visibilitychange' someEventHander)
which would mean adding the visibilitychange
property to the DocumentEventMap
interface.
However adding that property to addedTypes.json
does not modify this interface in dom.generated.d.ts
. Is there another way to submit a change to that?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Trying to update DocumentEventMap type · Issue #362 - GitHub
Hello, I am working on adding support for the onvisibilitychange event listener to the document object in PR #359.
Read more >Typescript addEventListener set event type - Stack Overflow
In version 3.3.3333 they defined this way in the lib.dom.ts. addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: ...
Read more >DocumentEventMap | typescript - v3.7.7
Inherited from GlobalEventHandlersEventMap.change. Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:5791 ...
Read more >Using strongly typed events in TypeScript - 43081j
A quick few tips on how to use strongly typed events in TypeScript.
Read more >Typesafe CustomEvents on your Frontend | by Inaki Anduaga
For instance, the React code that is in charge of updating the TotalCount ... and the payload ev is an index type of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The code has been changed, now adding this to addedTypes.json will work:
#465 hasn’t been active for a while so you may open a new one.