@colisweb/rescript-toolkit 2.47.0 → 2.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "2.47.0",
3
+ "version": "2.48.0",
4
4
  "scripts": {
5
5
  "clean": "rescript clean",
6
6
  "build": "rescript build -with-deps",
@@ -72,3 +72,29 @@ module Navigator = {
72
72
  | (None, None) => "fr"
73
73
  }
74
74
  }
75
+
76
+ module URL = {
77
+ type t
78
+
79
+ @new
80
+ external make: string => t = "URL"
81
+
82
+ @new
83
+ external makeFromLocation: Location.t => t = "URL"
84
+
85
+ @send @scope("searchParams")
86
+ external setSearchParams: (t, string, string) => unit = "set"
87
+ }
88
+
89
+ module History = {
90
+ type t
91
+
92
+ @val
93
+ external history: t = "window.history"
94
+
95
+ @send
96
+ external pushState: (t, Js.t<'a>, string, string) => unit = "pushState"
97
+
98
+ @send
99
+ external pushStateWithURL: (t, Js.t<'a>, string, URL.t) => unit = "pushState"
100
+ }
@@ -47,3 +47,29 @@ module Navigator: {
47
47
 
48
48
  let getBrowserLanguage: unit => string
49
49
  }
50
+
51
+ module URL: {
52
+ type t
53
+
54
+ @new
55
+ external make: string => t = "URL"
56
+
57
+ @new
58
+ external makeFromLocation: Location.t => t = "URL"
59
+
60
+ @send @scope("searchParams")
61
+ external setSearchParams: (t, string, string) => unit = "set"
62
+ }
63
+
64
+ module History: {
65
+ type t
66
+
67
+ @val
68
+ external history: t = "window.history"
69
+
70
+ @send
71
+ external pushState: (t, Js.t<'a>, string, string) => unit = "pushState"
72
+
73
+ @send
74
+ external pushStateWithURL: (t, Js.t<'a>, string, URL.t) => unit = "pushState"
75
+ }