Skip to content
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

Wrong typings for multiple XMLHttpRequestEventTarget Events #19830

Closed
peaBerberian opened this issue Nov 8, 2017 · 2 comments · Fixed by microsoft/TypeScript-DOM-lib-generator#432
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this

Comments

@peaBerberian
Copy link

TypeScript Version: 2.6.1

From WHATWG, most of the XMLHttpRequest events' payloads have the ProgressEvent interface:
https://xhr.spec.whatwg.org/#event-xhr-loadstart

From Typescript typings, payloads of onload, onabort and onloadstart are just Event instead.

From this same specification, onerror should also give us a Progress event. For now, we have an ErrorEvent instead, Exact same problem with the XMLHttpRequestEventTargetEventMap.

Is it done on purpose?

@peaBerberian peaBerberian changed the title Wrong typings for multiple XMLHttpRequestEventTarget callbacks Wrong typings for multiple XMLHttpRequestEventTarget Events Nov 8, 2017
@mhegazy
Copy link
Contributor

mhegazy commented Nov 8, 2017

Looks like a regression from #8691 (was fixed in microsoft/TypeScript-DOM-lib-generator#144).

@mhegazy
Copy link
Contributor

mhegazy commented Nov 8, 2017

PRs welcomed. You can find more information about contributing lib.d.ts fixes at https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md#contributing-libdts-fixes.

@mhegazy mhegazy added Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this Bug A bug in TypeScript labels Nov 8, 2017
@mhegazy mhegazy added this to the Community milestone Nov 8, 2017
@mhegazy mhegazy removed this from the Community milestone Apr 26, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants