-
Notifications
You must be signed in to change notification settings - Fork 441
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
HTMLElement onchange should use this: this
#195
Comments
Duplicate of microsoft/TypeScript#12490 I broke this with my change #166 to reduce instantiations in the library, by making less types generic (types using The fix here is to generate |
If I'm reading it right, microsoft/TypeScript#14141 may fix this by setting the |
correct. |
Given that microsoft/TypeScript#14141 has now been merged, what is left to do to fix this issue and microsoft/TypeScript#12490? I note that with with let i = new Image();
i.onload; // HTMLElement.onload: (this: HTMLElement, ev: Event) => any |
This won't help custom elements, and probably will generate much longer library file. (60+ lines per one HTMLElement interface, 80+ HTMLElements = 4800+ more lines)
The PR explicitly says that it works only on --noImplicitAny so I think it's not applicable to this issue. |
This example worked in
2.0
, but not in2.1
:The current definition for
onchange
inHTMLElement
is:onchange: (this: HTMLElement, ev: Event) => any;
. Maybe it should usethis: this
?The text was updated successfully, but these errors were encountered: