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

Incorrect signature of ErrorEvent constructor #12644

Closed
cronon opened this issue Dec 4, 2016 · 0 comments · Fixed by microsoft/TypeScript-DOM-lib-generator#171
Closed

Incorrect signature of ErrorEvent constructor #12644

cronon opened this issue Dec 4, 2016 · 0 comments · Fixed by microsoft/TypeScript-DOM-lib-generator#171
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue

Comments

@cronon
Copy link

cronon commented Dec 4, 2016

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.

cronon added a commit to cronon/TSJS-lib-generator that referenced this issue Dec 4, 2016
@mhegazy mhegazy added the Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet label Dec 16, 2016
@mhegazy mhegazy added this to the TypeScript 2.2 milestone Dec 16, 2016
@mhegazy mhegazy added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Dec 16, 2016
@mhegazy mhegazy reopened this Dec 16, 2016
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Feb 2, 2017
@zhengbli zhengbli removed the Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet label Feb 3, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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 Fixed A PR has been merged for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants