Skip to content

Commit 72b808d

Browse files
committed
Ensure unique method names when mixing and extensions are the same name.
1 parent 8a6ab64 commit 72b808d

35 files changed

+145
-97
lines changed

src/CanvasAPI/OffscreenCanvas.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Returns null if the canvas has already been initialized with another context typ
129129
external getContext: (
130130
offscreenCanvas,
131131
~contextId: offscreenRenderingContextId,
132-
~options: any=?,
132+
~options: JSON.t=?,
133133
) => offscreenRenderingContext = "getContext"
134134

135135
/**

src/ChannelMessagingAPI/MessagePort.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Throws a "DataCloneError" DOMException if transfer contains duplicate objects or
116116
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
117117
*/
118118
@send
119-
external postMessage: (messagePort, ~message: any, ~transfer: array<Dict.t<string>>) => unit =
119+
external postMessage: (messagePort, ~message: JSON.t, ~transfer: array<Dict.t<string>>) => unit =
120120
"postMessage"
121121

122122
/**
@@ -128,7 +128,7 @@ Throws a "DataCloneError" DOMException if transfer contains duplicate objects or
128128
@send
129129
external postMessage2: (
130130
messagePort,
131-
~message: any,
131+
~message: JSON.t,
132132
~options: structuredSerializeOptions=?,
133133
) => unit = "postMessage"
134134

src/DOMAPI.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6003,7 +6003,7 @@ and window = {
60036003
/**
60046004
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/opener)
60056005
*/
6006-
mutable opener: any,
6006+
mutable opener: JSON.t,
60076007
/**
60086008
Refers to either the parent WindowProxy, or itself.
60096009

src/DOMAPI/DOMMatrix.res

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ external toFloat64Array: domMatrix => float64Array = "toFloat64Array"
100100
external toJSON: domMatrix => Dict.t<string> = "toJSON"
101101

102102
@scope("DOMMatrix")
103-
external fromMatrix: (~other: domMatrixInit=?) => domMatrix = "fromMatrix"
103+
external fromMatrixD: (~other: domMatrixInit=?) => domMatrix = "fromMatrix"
104104

105105
@scope("DOMMatrix")
106-
external fromFloat32Array: array<float> => domMatrix = "fromFloat32Array"
106+
external fromFloat32ArrayD: array<float> => domMatrix = "fromFloat32Array"
107107

108108
@scope("DOMMatrix")
109-
external fromFloat64Array: float64Array => domMatrix = "fromFloat64Array"
109+
external fromFloat64ArrayD: float64Array => domMatrix = "fromFloat64Array"
110110

111111
@send
112112
external multiplySelf: (domMatrix, ~other: domMatrixInit=?) => domMatrix = "multiplySelf"

src/DOMAPI/DOMPoint.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ external toJSON: domPoint => Dict.t<string> = "toJSON"
2525
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint_static)
2626
*/
2727
@scope("DOMPoint")
28-
external fromPoint: (~other: domPointInit=?) => domPoint = "fromPoint"
28+
external fromPointD: (~other: domPointInit=?) => domPoint = "fromPoint"

src/DOMAPI/DOMRect.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ external toJSON: domRect => Dict.t<string> = "toJSON"
1919
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/DOMRect/fromRect_static)
2020
*/
2121
@scope("DOMRect")
22-
external fromRect: (~other: domRectInit=?) => domRect = "fromRect"
22+
external fromRectD: (~other: domRectInit=?) => domRect = "fromRect"

src/DOMAPI/HTMLCanvasElement.res

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -730,16 +730,20 @@ Returns an object that provides methods and properties for drawing and manipulat
730730
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/getContext)
731731
*/
732732
@send
733-
external getContext: (htmlCanvasElement, ~contextId: string, ~options: any=?) => renderingContext =
734-
"getContext"
733+
external getContext: (
734+
htmlCanvasElement,
735+
~contextId: string,
736+
~options: JSON.t=?,
737+
) => renderingContext = "getContext"
735738

736739
/**
737740
Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element.
738741
@param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
739742
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/toDataURL)
740743
*/
741744
@send
742-
external toDataURL: (htmlCanvasElement, ~type_: string=?, ~quality: any=?) => string = "toDataURL"
745+
external toDataURL: (htmlCanvasElement, ~type_: string=?, ~quality: JSON.t=?) => string =
746+
"toDataURL"
743747

744748
/**
745749
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/toBlob)
@@ -749,7 +753,7 @@ external toBlob: (
749753
htmlCanvasElement,
750754
~callback: blobCallback,
751755
~type_: string=?,
752-
~quality: any=?,
756+
~quality: JSON.t=?,
753757
) => unit = "toBlob"
754758

755759
/**

src/DOMAPI/HTMLCollectionOf.re.js

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/DOMAPI/HTMLSelectElement.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,15 +754,15 @@ Removes an element from the collection.
754754
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/remove)
755755
*/
756756
@send
757-
external remove: htmlSelectElement => unit = "remove"
757+
external removeH: htmlSelectElement => unit = "remove"
758758

759759
/**
760760
Removes an element from the collection.
761761
@param index Number that specifies the zero-based index of the element to remove from the collection.
762762
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLSelectElement/remove)
763763
*/
764764
@send
765-
external remove2: (htmlSelectElement, int) => unit = "remove"
765+
external removeH2: (htmlSelectElement, int) => unit = "remove"
766766

767767
/**
768768
Returns whether a form will validate when it is submitted, without having to submit it.

src/DOMAPI/Window.res

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ open EventAPI
1010
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/reportError)
1111
*/
1212
@send
13-
external reportError: (window, any) => unit = "reportError"
13+
external reportError: (window, JSON.t) => unit = "reportError"
1414

1515
/**
1616
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/btoa)
@@ -28,14 +28,14 @@ external atob: (window, string) => string = "atob"
2828
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
2929
*/
3030
@send
31-
external setTimeout: (window, ~handler: string, ~timeout: int=?, ~arguments: any) => int =
31+
external setTimeout: (window, ~handler: string, ~timeout: int=?, ~arguments: JSON.t) => int =
3232
"setTimeout"
3333

3434
/**
3535
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setTimeout)
3636
*/
3737
@send
38-
external setTimeout2: (window, ~handler: unit => unit, ~timeout: int=?, ~arguments: any) => int =
38+
external setTimeout2: (window, ~handler: unit => unit, ~timeout: int=?, ~arguments: JSON.t) => int =
3939
"setTimeout"
4040

4141
/**
@@ -48,15 +48,19 @@ external clearTimeout: (window, int) => unit = "clearTimeout"
4848
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setInterval)
4949
*/
5050
@send
51-
external setInterval: (window, ~handler: string, ~timeout: int=?, ~arguments: any) => int =
51+
external setInterval: (window, ~handler: string, ~timeout: int=?, ~arguments: JSON.t) => int =
5252
"setInterval"
5353

5454
/**
5555
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/setInterval)
5656
*/
5757
@send
58-
external setInterval2: (window, ~handler: unit => unit, ~timeout: int=?, ~arguments: any) => int =
59-
"setInterval"
58+
external setInterval2: (
59+
window,
60+
~handler: unit => unit,
61+
~timeout: int=?,
62+
~arguments: JSON.t,
63+
) => int = "setInterval"
6064

6165
/**
6266
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/clearInterval)
@@ -491,7 +495,7 @@ Throws a "DataCloneError" DOMException if transfer array contains duplicate obje
491495
@send
492496
external postMessage: (
493497
window,
494-
~message: any,
498+
~message: JSON.t,
495499
~targetOrigin: string,
496500
~transfer: array<Dict.t<string>>=?,
497501
) => unit = "postMessage"
@@ -509,7 +513,7 @@ Throws a "DataCloneError" DOMException if transfer array contains duplicate obje
509513
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/postMessage)
510514
*/
511515
@send
512-
external postMessage2: (window, ~message: any, ~options: windowPostMessageOptions=?) => unit =
516+
external postMessage2: (window, ~message: JSON.t, ~options: windowPostMessageOptions=?) => unit =
513517
"postMessage"
514518

515519
/**

0 commit comments

Comments
 (0)