TypeScript-DOM-lib-generator icon indicating copy to clipboard operation
TypeScript-DOM-lib-generator copied to clipboard

Generic DOM Events

Open nscarcella opened this issue 2 years ago • 24 comments

Hopefully fixes https://github.com/microsoft/TypeScript/issues/299

Added generics to Events so that target and currentTarget's types can be parameterized and event listeners can take a callback that expects an event targeting the receiver's type.

All new generics have default values, so the change should be backward compatible and all tests seem to be passing.

This is my first PR to the project and I hope I'm following the community norms, but please let me know if the implementation is up to standards or something is amiss.

nscarcella avatar Sep 29 '23 02:09 nscarcella