Skip to content

Wrong typings for multiple XMLHttpRequestEventTarget Events #19830

Closed
microsoft/TypeScript-DOM-lib-generator
#432

Description

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?

Activity

  1. changed the title [-]Wrong typings for multiple XMLHttpRequestEventTarget callbacks[/-] [+]Wrong typings for multiple XMLHttpRequestEventTarget Events[/+] on Nov 8, 2017
  2. mhegazy commented on Nov 8, 2017

    @mhegazy
    Contributor

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

  3. mhegazy commented on Nov 8, 2017

    @mhegazy
    Contributor

    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.

  4. added this to the milestone on Nov 8, 2017
  5. removed this from the milestone on Apr 26, 2018
  6. locked and limited conversation to collaborators on Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions