Closed saantonandre closed 1 month ago
Really nice work! Thanks so much for digging through all the event types to collect this. I had to bump the @types/node
version to pick up an updated EventEmitter def that takes the events map as a generic but otherwise this seems good to go.
The current type declaration does not provide intellisense to the EventEmitter methods of Window:
Which is quite annoying because the only way to know the parameter for a specific event would be to log them beforehand. Through some logging and typescript gymnastic I've created a mapped type for every suppoerted event, so that the EventEmitter methods will suggest the event types and correctly infer the respective callbacks arguments: