Last active
October 4, 2018 06:33
-
-
Save inakianduaga/400d5701b6bec82779d279a128b60aee to your computer and use it in GitHub Desktop.
Typesafe CustomEvents on your Frontend - standard library section
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// lib.dom.d.ts section | |
// https://github.com/Microsoft/TypeScript/blob/master/lib/lib.dom.d.ts#L4450 | |
addEventListener<K extends keyof DocumentEventMap>( | |
type: K, | |
listener: (this: Document, ev: DocumentEventMap[K]) => any, | |
options?: boolean | AddEventListenerOptions | |
): void; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment