Skip to content

Wrong WebGLRenderingContext interface definition for pixelStorei #27542

@SpaceIm

Description

@SpaceIm

TypeScript Version: 3.1.1

Search Terms:
WebGLRenderingContext
pixelStorei

Code

gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);

Expected behavior:
well compiled

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

pixelStorei definition in lib.dom.d.ts (in 3.1-rc and 3.1.1) :

pixelStorei(pname: GLenum, param: GLint): void;

should be :

pixelStorei(pname: GLenum, param: GLint | GLboolean): void;

In 3.0.3, pixelStorei definition was :

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions