-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Event.currentTarget type #207
Conversation
Travis seems to have problems downloading mono bits. Will retry CI later. |
baselines/webworker.generated.d.ts
Outdated
@@ -399,9 +399,9 @@ declare var Event: { | |||
} | |||
|
|||
interface EventTarget { | |||
addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void; | |||
addEventListener(type: string, listener?: EventListenerOrEventListenerObject<this>, useCapture?: boolean): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general we do not want to set this
as it turns all the types that inherit from EventTarget (almost all DOM types) as generic, and every time you reference them we make an instantiation, more memory and more time spent checking the default lib file.
can we make EventTarget and pass the current type through?
@mhegazy now there are no |
Why is this still pending? What is the next step? How could I maybe help? |
This PR still has performance problem:
Compared to the current master:
|
Any progress on this? It's really annoying to have as |
Generics on TS is fairly expensive, probably the performance problem should be somehow managed before any fix for this issue. |
Why is this closed? This is still an issue! And explanation on why this is closed would be very helpful. |
I guess because the author stopped working on TS. (And this PR is so old that it is simply incompatible with the current code.) |
The PR is two years out of date, back when (1) the code was written in F# (2) the IDL source was IE or Edge. microsoft/TypeScript#299, the issue tracking this problem, is still open and has 31 upvotes right now. |
Okay. Interesting news. I wonder why this isn't communicated more offensively. I guess many people would like to know more about such changes. It would be nice to see such changes and information in TypeScript Release Notes and Roadmap. |
This should fix microsoft/TypeScript#299