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

ImageData constructor signature is incorrect #4220

Closed
jteplitz opened this issue Aug 7, 2015 · 2 comments
Closed

ImageData constructor signature is incorrect #4220

jteplitz opened this issue Aug 7, 2015 · 2 comments
Labels
Breaking Change Would introduce errors in existing code 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

@jteplitz
Copy link

jteplitz commented Aug 7, 2015

lib.d.ts (and lib.webworkers.d.ts) define the ImageData constructor constructor as taking no arguments, but there should actually be two constructor signatures of the following form according to mdn:

new ImageData(array, width, height);
new ImageData(width, height);
@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Help Wanted You can do this Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Aug 7, 2015
jteplitz added a commit to jteplitz/TypeScript that referenced this issue Aug 7, 2015
@jteplitz
Copy link
Author

jteplitz commented Aug 7, 2015

Submitted PR #4224 to fix this. It looks like the constructor is only defined in ES6 compatible browsers so I've only added the definition in lib.es6 and lib.webworkers

@mhegazy mhegazy removed the Help Wanted You can do this label Aug 7, 2015
@mhegazy
Copy link
Contributor

mhegazy commented Aug 7, 2015

We can not accept a PR for this. sorry for the wrong tag. this file is auto generated. we have to update the script that generates this. We should post the sources of this script on another repo to allow the community to update it for similar issues. until then, @zhengbli will take care of this bug.

@mhegazy mhegazy added this to the TypeScript 1.6 milestone Aug 7, 2015
@mhegazy mhegazy added the Breaking Change Would introduce errors in existing code label Aug 19, 2015
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Aug 20, 2015
@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
Breaking Change Would introduce errors in existing code 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

No branches or pull requests

4 participants