createImageBitmap() imageOrientation
option type incorrect in 5.0.0-beta
#53053
Labels
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
Milestone
lib Update Request
Configuration Check
My compilation target is
ES2022
and my lib isthe default
.Missing / Incorrect Definition
In 5.0.0-beta the DOM provided createImageBitmap (MDN linked) function is not allowing the string "none" to be set on the
imageOrientation
option property.It should be allowing the strings
"flipY" | "none"
according to MDN (and does work in previous TS versions) but in 5.0.0-beta the only strings allowed are:"flipY" | "from-image"
."from-image"
seems to be coming from a related but separate CSS property calledimage-orientation
.node_modules/typescript/lib/lib.dom.d.ts:
Sample Code
Sample:
Playground Link
Documentation Link
https://developer.mozilla.org/en-US/docs/Web/API/createImageBitmap
The text was updated successfully, but these errors were encountered: