@rescript/webapi 0.1.0-experimental-5bcdadd → 0.1.0-experimental-d10ffec

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": "@rescript/webapi",
3
- "version": "0.1.0-experimental-5bcdadd",
3
+ "version": "0.1.0-experimental-d10ffec",
4
4
  "description": "Experimental successor to [rescript-webapi](https://github.com/TheSpyder/rescript-webapi)",
5
5
  "homepage": "https://rescript-lang.github.io/experimental-rescript-webapi/",
6
6
  "bugs": "https://github.com/rescript-lang/experimental-rescript-webapi/issues",
package/src/EventAPI.res CHANGED
@@ -226,5 +226,5 @@ The ExtendableEvent interface extends the lifetime of the install and activate e
226
226
  */
227
227
  @editor.completeFrom(ExtendableEvent)
228
228
  type extendableEvent = {
229
- ...event
230
- }
229
+ ...event,
230
+ }
@@ -73,7 +73,7 @@ type notification = {
73
73
  type notificationAction = {
74
74
  action: string,
75
75
  title: string,
76
- icon?: string
76
+ icon?: string,
77
77
  }
78
78
 
79
79
  type notificationOptions = {
@@ -86,7 +86,7 @@ type notificationOptions = {
86
86
  mutable silent?: Null.t<bool>,
87
87
  mutable requireInteraction?: bool,
88
88
  mutable data?: JSON.t,
89
- mutable actions?: array<notificationAction>
89
+ mutable actions?: array<notificationAction>,
90
90
  }
91
91
 
92
92
  type getNotificationOptions = {mutable tag?: string}
@@ -1,5 +1,5 @@
1
1
  open PushAPI
2
2
 
3
3
  include ExtendableEvent.Impl({
4
- type t = pushEvent;
5
- });
4
+ type t = pushEvent
5
+ })
@@ -12,4 +12,4 @@ The text() method of the PushMessageData interface extracts push message data as
12
12
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushMessageData/text)
13
13
  */
14
14
  @send
15
- external text: pushMessageData => string = "text"
15
+ external text: pushMessageData => string = "text"
package/src/PushAPI.res CHANGED
@@ -65,10 +65,17 @@ type pushSubscriptionOptionsInit = {
65
65
  mutable applicationServerKey?: applicationServerKey,
66
66
  }
67
67
 
68
+ type pushSubscriptionJSONKeys = {
69
+ /** Base64URL-encoded ArrayBuffer value */
70
+ p256dh: string,
71
+ /** Base64URL-encoded ArrayBuffer value */
72
+ auth: string,
73
+ }
74
+
68
75
  type pushSubscriptionJSON = {
69
76
  mutable endpoint?: string,
70
77
  mutable expirationTime?: Null.t<int>,
71
- mutable keys?: any,
78
+ mutable keys?: pushSubscriptionJSONKeys,
72
79
  }
73
80
 
74
81
  @editor.completeFrom(PushMessageData)
@@ -81,4 +88,4 @@ type pushEvent = {
81
88
  [Read more on MDN](https://developer.mozilla.org/docs/Web/API/PushEvent/data)
82
89
  */
83
90
  data?: pushMessageData,
84
- }
91
+ }
@@ -2,4 +2,4 @@ open ServiceWorkerAPI
2
2
 
3
3
  include WorkerGlobalScope.Impl({
4
4
  type t = serviceWorkerGlobalScope
5
- })
5
+ })
@@ -155,4 +155,4 @@ The WindowClient interface of the ServiceWorker API represents the scope of a se
155
155
  */
156
156
  type windowClient = {
157
157
  ...client,
158
- }
158
+ }
@@ -22,7 +22,7 @@ let response = await self->WorkerGlobalScope.fetch("https://rescript-lang.org")
22
22
 
23
23
  [Read more on MDN](https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/fetch)
24
24
  */
25
- @send
25
+ @send
26
26
  external fetch: (T.t, string, ~init: requestInit=?) => promise<response> = "fetch"
27
27
 
28
28
  /**