Skip to content

Incorrect signature of ErrorEvent constructor #12644

Closed
microsoft/TypeScript-DOM-lib-generator
#171
@cronon

Description

@cronon

TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)

Expected behavior:
ErrorEvent constructor should have params accorditng to the spec
https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface

interface ErrorEventInit extends EventInit {
  message?: string;
  filename?: string;
  lineno?: number;
  conlno?: number;
  error?: any;
}
declare var ErrorEvent: {
    prototype: ErrorEvent;
    new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent;
}

Actual behavior:
In lb.d.ts https://github.com/Microsoft/TypeScript/blob/master/lib/lib.d.ts#L7903
ErrorEvent constructor doesn't have any params.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions