Fix missing optional parameter of createImageBitmap#571
Fix missing optional parameter of createImageBitmap#571sandersn merged 11 commits intomicrosoft:masterfrom
Conversation
Different for Window or WorkerGlobalScope
sandersn
left a comment
There was a problem hiding this comment.
I would like to return the definition of imageBitmapOptions to using inline unions instead of aliases.
baselines/dom.generated.d.ts
Outdated
| type ChannelCountMode = "max" | "clamped-max" | "explicit"; | ||
| type ChannelInterpretation = "speakers" | "discrete"; | ||
| type ClientTypes = "window" | "worker" | "sharedworker" | "all"; | ||
| type ColorSpaceConversion = "none" | "default"; |
There was a problem hiding this comment.
Small global aliases are annoying because of alias interning: everybody with a type none | default will now see the name ColorSpaceConversion for it.
Not sure the best workaround for this. I’ll think about it.
There was a problem hiding this comment.
Thank you for reviewing, I will find time to come back and reconsider about this PR soon. :)
| } | ||
| } | ||
| }, | ||
| "ImageBitmapOptions": { |
There was a problem hiding this comment.
What replaces this entry? Whatever it is, it results in a whole bunch of unwanted type aliases.
There was a problem hiding this comment.
The already existing dictionary ImageBitmapOptions in HTML - ImageBitmap and animations.widl replaces this entry. This was a conflict if I remember right.
|
Are the IDL changes hand-written or generated by |
@saschanaz Sorry for the delay. They are handwritten. *.d.ts are generated. |
|
Sorry to be late, but IDLs must not be hand-written and instead should be generated by |
|
@hexrcs Mind refreshing this PR? The removal in addedTypes.json looks great but the manual edits in *.widl do not. Can you remove them and do Some explanation: The old item in |
|
@saschanaz Yes, would like to! Will be checking this out tonight or tomorrow. Thanks for the clarification. |
|
@saschanaz Hi, which |
|
I tried to run Looks like something's wrong with |
"HTML - ImageBitmap and animations", but it can be skipped for this PR. Looks like |
|
Ah right, the code has been updated and now it should be |
That should be fixed by #648, it's because other specs has started referencing it while the code doesn't know about it. |
|
@saschanaz Done! Could you please review again? 😃 |
|
Any progress or guidance on how to use |
TypeScript Issue # 27475
ImageBitmapOptionswas declared both inaddedTypes.jsonas an interface and inidl/HTML - ImageBitmap and animations.widlas a dictionary, which is I believe the root cause of it not showing up as an optional parameter insidecreateImageBitmapmethod. I removed theinterfacedeclaration.WindowandWorkerhave different supports forImageBitmapSource(see this conversation). I created two distinct typesImageBitmapSourceWindowandImageBitmapSourceWorkerfor them in thewidlfiles.This is my first PR to a major open source project ;) Please kindly review the changes I made. Suggestions would be much appreciated!