Wrong typings for multiple XMLHttpRequestEventTarget Events #19830
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
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
andonloadstart
are justEvent
instead.From this same specification,
onerror
should also give us aProgress
event. For now, we have anErrorEvent
instead, Exact same problem with theXMLHttpRequestEventTargetEventMap
.Is it done on purpose?
The text was updated successfully, but these errors were encountered: