-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this
Milestone
Description
TypeScript Version: 3.1.1
Search Terms:
createImageBitmap, ImageBitmapOptions, Image Bitmap, lib.dom
Code
const bitmap1 = createImageBitmap(img, { premultiplyAlpha: 'none' })
const bitmap2 = createImageBitmap(img, 0, 0, img.width, img.height, { premultiplyAlpha: 'none' })Expected behavior:
Should compile and create Promise<ImageBitmap> in both cases.
Actual behavior:
Doesn't compile since last optional options param was removed from lib.dom.d.ts between 3.0.3 and 3.1.0. Although ImageBitmapOptions are still present in lib.dom.d.ts.
It was removed in commit ee25cde with vendor specific types (even though it's not vendor-specific).
Even though not all browsers supports last optional param, it's still part of living standard.
sapics and s4m0r4m4
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this