Closed
Description
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. :)