Skip to content

Commit c1678fb

Browse files
dhaigsaschanaz
andauthored
Add more specific types for CanvasRenderingContext2D.globalCompositeOperation (#1206)
Co-authored-by: saschanaz <[email protected]>
1 parent 315f15a commit c1678fb

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

baselines/dom.generated.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3245,7 +3245,7 @@ declare var CacheStorage: {
32453245

32463246
interface CanvasCompositing {
32473247
globalAlpha: number;
3248-
globalCompositeOperation: string;
3248+
globalCompositeOperation: GlobalCompositeOperation;
32493249
}
32503250

32513251
interface CanvasDrawImage {
@@ -17757,6 +17757,7 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
1775717757
type FullscreenNavigationUI = "auto" | "hide" | "show";
1775817758
type GamepadHapticActuatorType = "vibration";
1775917759
type GamepadMappingType = "" | "standard" | "xr-standard";
17760+
type GlobalCompositeOperation = "color" | "color-burn" | "color-dodge" | "copy" | "darken" | "destination-atop" | "destination-in" | "destination-out" | "destination-over" | "difference" | "exclusion" | "hard-light" | "hue" | "lighten" | "lighter" | "luminosity" | "multiply" | "overlay" | "saturation" | "screen" | "soft-light" | "source-atop" | "source-in" | "source-out" | "source-over" | "xor";
1776017761
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
1776117762
type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
1776217763
type IDBRequestReadyState = "done" | "pending";

inputfiles/addedTypes.jsonc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,37 @@
280280
"value": [
281281
"inprogress"
282282
]
283+
},
284+
"GlobalCompositeOperation": {
285+
"name": "GlobalCompositeOperation",
286+
"value": [
287+
"source-over",
288+
"source-in",
289+
"source-out",
290+
"source-atop",
291+
"destination-over",
292+
"destination-in",
293+
"destination-out",
294+
"destination-atop",
295+
"lighter",
296+
"copy",
297+
"xor",
298+
"multiply",
299+
"screen",
300+
"overlay",
301+
"darken",
302+
"lighten",
303+
"color-dodge",
304+
"color-burn",
305+
"hard-light",
306+
"soft-light",
307+
"difference",
308+
"exclusion",
309+
"hue",
310+
"saturation",
311+
"color",
312+
"luminosity"
313+
]
283314
}
284315
}
285316
},

inputfiles/overridingTypes.jsonc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,15 @@
202202
}
203203
}
204204
},
205+
"CanvasCompositing": {
206+
"properties": {
207+
"property": {
208+
"globalCompositeOperation": {
209+
"type": "GlobalCompositeOperation"
210+
}
211+
}
212+
}
213+
},
205214
"Body": {
206215
"properties": {
207216
"property": {

0 commit comments

Comments
 (0)