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

wrong WebGLRenderingContext interface definition about gl.pixelStore #13093

Closed
ReadingSteiner opened this issue Dec 21, 2016 · 1 comment
Closed
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 Help Wanted You can do this

Comments

@ReadingSteiner
Copy link

TypeScript Version: 2.1.4

Code

gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true)

Expected behavior:
well compiled

Actual behavior:
error TS2345: Argument of type 'true' is not assignable to parameter of type 'number'

I checked the lib.d.ts and got this

pixelStorei(pname: number, param: number): void;

but it should be

pixelStorei(pname: number, param: number | boolean): void;

check this API at MDN here

@mhegazy mhegazy added 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 labels Dec 21, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Dec 21, 2016

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.

@mhegazy mhegazy added this to the Community milestone Dec 21, 2016
@mhegazy mhegazy added the Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet label Jan 3, 2017
@mhegazy mhegazy modified the milestones: TypeScript 2.2, Community Jan 3, 2017
@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 Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

3 participants