Skip to content

ImageBitmap interface missing #14402

Closed
Closed
@nkemnitz

Description

@nkemnitz

TypeScript Version: 2.2.1

Code

window.onload = () => {
    fetch("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==")
    .then(res => res.blob())
    .then(blob => window.createImageBitmap(blob, { resizeWidth: 128, resizeHeight: 128, resizeQuality: "pixelated" }))
    .then(/* do something amazing */);
}

Expected behavior:
No compilation errors.

Actual behavior:
Property 'createImageBitmap' does not exist on type 'Window'.

ImageBitmap is defined in WHATWG HTML Living Standard. I'll create a PR in a few minutes. :)

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions