-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ImageData constructor #4306
Changes from all commits
82dc484
37c0acf
9848e33
831d2eb
df3ecab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ interface NodeList { | |
|
||
interface NodeListOf<TNode extends Node> { | ||
[Symbol.iterator](): IterableIterator<TNode> | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -465,11 +465,14 @@ interface ImageData { | |
width: number; | ||
} | ||
|
||
declare var ImageData: { | ||
interface ImageDataConstructor { | ||
prototype: ImageData; | ||
new(): ImageData; | ||
new(width: number, height: number): ImageData; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is going to be a breaking change. are we sure that ImageData does not have a constructor overload that takes no arguments? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The MDN spec has only two constructors with arguments. And I tried in IE, Edge, Firefox and Chrome, none of them supports an argument-less constructor for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks 👍 |
||
new(array: Uint8ClampedArray, width: number, height: number): ImageData; | ||
} | ||
|
||
declare var ImageData: ImageDataConstructor; | ||
|
||
interface MSApp { | ||
clearTemporaryWebDataAsync(): MSAppAsyncOperation; | ||
createBlobFromRandomAccessStream(type: string, seeker: any): Blob; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think this is correct.. we need a new interface ImageDataConstructor so that: