-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Regression in dom.lib.d.ts: TS complains about FileReader's result #25510
Regression in dom.lib.d.ts: TS complains about FileReader's result #25510
Comments
It looks like the regression was introduced in 7a7d04e |
The behavior change was introduced in microsoft/TypeScript-DOM-lib-generator#448. the PR switched to use the widl file to generate the .d.ts file for the File APIs. The widl does not seem to define the //cc @saschanaz |
FileReaderProgressEvent is obsolete and replaced by ProgressEvent, as the PR says. |
Interesting. So the spec intent is clear: the The current declarations don't capture this, stating that we deal with a generic |
Yeah... I think this is related to #299. |
@saschanaz maybe we should redefine the |
Hi, any news on this? After updating typescript to 3.0 I am getting |
I would suggest using general |
Hi. I introduced It is possible to have |
I think microsoft/TypeScript-DOM-lib-generator#207 is better as its more general, readable, and easy to write. We may add |
Any progress on this one? |
Any progress on this? What are we waiting on to get this fixed, as it's clearly been identified as a bug that needs fixing... |
For now I worked around this with:
|
It's too late to fix this for 3.5 but it needs to be fixed as soon as 3.6 development starts so people have a chance to test the new lib.dom.d.ts. |
This type doesn't exist, but is useful until we parametrise ProgressEvent with subtype properties. Fixes microsoft/TypeScript#25510
This type doesn't exist, but is useful until we parametrise ProgressEvent with subtype properties. Fixes microsoft/TypeScript#25510
TypeScript Version: 3.0.0-dev.20180707
Search Terms: dom, FileReader
Code
Taken directly from MDN: https://developer.mozilla.org/en-US/docs/Web/API/FileReader/onload
Expected behavior:
No errors.
Actual behavior:
[ts] Property 'result' does not exist on type 'EventTarget'.
This is a regression, since there were no such errors reported in TS 2.9.2.
The text was updated successfully, but these errors were encountered: