1- module type ModuleWithT = {
2- type t
3- }
4-
51/**
62 * Named parameters have 1~3 of lenght, should resemble MDN/typescript docs/types.
73 * This module exposes the typescript CanvasPath interface
84 * https://github.com/microsoft/TypeScript/blob/46410044add2e9f53cea58e445de18dcda53443f/src/lib/dom.generated.d.ts#L5455
95 */
10- module Make = (M : ModuleWithT ) => {
6+ module Impl = (
7+ T : {
8+ type t
9+ },
10+ ) => {
1111 // type t = M.t
1212 /** https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/arc */
1313 @send
1414 external arc : (
15- M .t ,
15+ T .t ,
1616 ~x : float ,
1717 ~y : float ,
1818 ~r : float ,
@@ -24,12 +24,12 @@ module Make = (M: ModuleWithT) => {
2424
2525 /** https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/arcTo */
2626 @send
27- external arcTo : (M .t , ~x1 : float , ~y1 : float , ~x2 : float , ~y2 : float , ~r : float ) => unit = "arcTo"
27+ external arcTo : (T .t , ~x1 : float , ~y1 : float , ~x2 : float , ~y2 : float , ~r : float ) => unit = "arcTo"
2828
2929 /** https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/bezierCurveTo */
3030 @send
3131 external bezierCurveTo : (
32- M .t ,
32+ T .t ,
3333 ~cp1x : float ,
3434 ~cp1y : float ,
3535 ~cp2x : float ,
@@ -40,12 +40,12 @@ module Make = (M: ModuleWithT) => {
4040
4141 /** https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/closePath*/
4242 @send
43- external closePath : M .t => unit = "closePath"
43+ external closePath : T .t => unit = "closePath"
4444
4545 /** https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/ellipse */
4646 @send
4747 external ellipse : (
48- M .t ,
48+ T .t ,
4949 ~x : float ,
5050 ~y : float ,
5151 ~rx : float ,
@@ -59,23 +59,23 @@ module Make = (M: ModuleWithT) => {
5959
6060 /** https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineTo */
6161 @send
62- external lineTo : (M .t , ~x : float , ~y : float ) => unit = "lineTo"
62+ external lineTo : (T .t , ~x : float , ~y : float ) => unit = "lineTo"
6363
6464 /** https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/moveTo */
6565 @send
66- external moveTo : (M .t , ~x : float , ~y : float ) => unit = "moveTo"
66+ external moveTo : (T .t , ~x : float , ~y : float ) => unit = "moveTo"
6767
6868 /** https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/quadraticCurveTo */
6969 @send
70- external quadraticCurveTo : (M .t , ~cpx : float , ~cpy : float , ~x : float , ~y : float ) => unit =
70+ external quadraticCurveTo : (T .t , ~cpx : float , ~cpy : float , ~x : float , ~y : float ) => unit =
7171 "quadraticCurveTo"
7272
7373 /** https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/rect */
7474 @send
75- external rect : (M .t , ~x : float , ~y : float , ~w : float , ~h : float ) => unit = "rect"
75+ external rect : (T .t , ~x : float , ~y : float , ~w : float , ~h : float ) => unit = "rect"
7676
7777 /** https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/roundRect */
7878 @send
79- external roundRect : (M .t , ~x : float , ~y : float , ~w : float , ~h : float , ~r : float ) => unit =
79+ external roundRect : (T .t , ~x : float , ~y : float , ~w : float , ~h : float , ~r : float ) => unit =
8080 "roundRect"
8181}
0 commit comments