@rescript/webapi 0.1.0-experimental-ae83778 → 0.1.0-experimental-e13fb00
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 +1 -1
- package/src/CSSFontLoadingAPI/FontFace.res +1 -1
- package/src/CSSFontLoadingAPI/FontFaceSet.res +1 -1
- package/src/CSSFontLoadingAPI.res +2 -2
- package/src/CanvasAPI/OffscreenCanvas.res +1 -1
- package/src/ClipboardAPI/Clipboard.res +4 -4
- package/src/ClipboardAPI/ClipboardItem.res +1 -1
- package/src/CredentialManagementAPI/CredentialsContainer.res +4 -4
- package/src/DOMAPI/CSSStyleSheet.res +1 -1
- package/src/DOMAPI/CustomElementRegistry.res +1 -1
- package/src/DOMAPI/Document.res +4 -4
- package/src/DOMAPI/Element.res +2 -2
- package/src/DOMAPI/HTMLImageElement.res +1 -1
- package/src/DOMAPI/HTMLMediaElement.res +3 -3
- package/src/DOMAPI/HTMLVideoElement.res +1 -1
- package/src/DOMAPI/Navigator.res +5 -5
- package/src/DOMAPI/VideoFrame.res +3 -3
- package/src/DOMAPI/Window.res +20 -20
- package/src/DOMAPI.res +2 -2
- package/src/EncryptedMediaExtensionsAPI/MediaKeySession.res +7 -7
- package/src/EncryptedMediaExtensionsAPI/MediaKeySystemAccess.res +1 -1
- package/src/EncryptedMediaExtensionsAPI/MediaKeys.res +3 -3
- package/src/EncryptedMediaExtensionsAPI.res +1 -1
- package/src/FetchAPI/Request.res +6 -6
- package/src/FetchAPI/Response.res +6 -6
- package/src/FileAPI/Blob.res +3 -3
- package/src/FileAPI/FileSystemDirectoryHandle.res +5 -5
- package/src/FileAPI/FileSystemFileHandle.res +3 -3
- package/src/FileAPI/FileSystemHandle.res +1 -1
- package/src/FileAPI/FileSystemWritableFileStream.res +9 -9
- package/src/FileAPI/ReadableStream.res +2 -2
- package/src/FileAPI/WritableStream.res +2 -2
- package/src/FileAPI.res +1 -1
- package/src/GamepadAPI/GamepadHapticActuator.res +2 -2
- package/src/Global.res +20 -20
- package/src/IndexedDBAPI/IDBFactory.res +1 -1
- package/src/MediaCapabilitiesAPI/MediaCapabilities.res +2 -2
- package/src/MediaCaptureAndStreamsAPI/MediaDevices.res +3 -3
- package/src/MediaCaptureAndStreamsAPI/MediaStreamTrack.res +1 -1
- package/src/NotificationAPI/Notification.res +1 -1
- package/src/PermissionsAPI/Permissions.res +1 -1
- package/src/PushManagerAPI/PushManager.res +3 -3
- package/src/PushManagerAPI/PushSubscription.res +1 -1
- package/src/RemotePlaybackAPI/RemotePlayback.res +3 -3
- package/src/ScreenWakeLockAPI/WakeLock.res +1 -1
- package/src/ScreenWakeLockAPI/WakeLockSentinel.res +1 -1
- package/src/ServiceWorkerAPI/Cache.res +11 -11
- package/src/ServiceWorkerAPI/CacheStorage.res +4 -4
- package/src/ServiceWorkerAPI/NavigationPreloadManager.res +4 -4
- package/src/ServiceWorkerAPI/ServiceWorkerContainer.res +2 -2
- package/src/ServiceWorkerAPI/ServiceWorkerRegistration.res +4 -4
- package/src/ServiceWorkerAPI.res +1 -1
- package/src/StorageAPI/StorageManager.res +4 -4
- package/src/ViewTransitionsAPI.res +4 -4
- package/src/WebAudioAPI/AudioContext.res +3 -3
- package/src/WebAudioAPI/BaseAudioContext.res +1 -1
- package/src/WebAudioAPI/OfflineAudioContext.res +3 -3
- package/src/WebAudioAPI/Worklet.res +1 -1
- package/src/WebCryptoAPI/SubtleCrypto.res +15 -15
- package/src/WebLocksAPI/LockManager.res +3 -3
- package/src/WebLocksAPI.res +1 -1
|
@@ -23,7 +23,7 @@ external matchAll: (
|
|
|
23
23
|
cache,
|
|
24
24
|
~request: request=?,
|
|
25
25
|
~options: cacheQueryOptions=?,
|
|
26
|
-
) =>
|
|
26
|
+
) => promise<array<response>> = "matchAll"
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/matchAll)
|
|
@@ -33,50 +33,50 @@ external matchAll2: (
|
|
|
33
33
|
cache,
|
|
34
34
|
~request: string=?,
|
|
35
35
|
~options: cacheQueryOptions=?,
|
|
36
|
-
) =>
|
|
36
|
+
) => promise<array<response>> = "matchAll"
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/add)
|
|
40
40
|
*/
|
|
41
41
|
@send
|
|
42
|
-
external add: (cache, request) =>
|
|
42
|
+
external add: (cache, request) => promise<unit> = "add"
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/add)
|
|
46
46
|
*/
|
|
47
47
|
@send
|
|
48
|
-
external add2: (cache, string) =>
|
|
48
|
+
external add2: (cache, string) => promise<unit> = "add"
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/addAll)
|
|
52
52
|
*/
|
|
53
53
|
@send
|
|
54
|
-
external addAll: (cache, array<requestInfo>) =>
|
|
54
|
+
external addAll: (cache, array<requestInfo>) => promise<unit> = "addAll"
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/put)
|
|
58
58
|
*/
|
|
59
59
|
@send
|
|
60
|
-
external put: (cache, ~request: request, ~response: response) =>
|
|
60
|
+
external put: (cache, ~request: request, ~response: response) => promise<unit> = "put"
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/put)
|
|
64
64
|
*/
|
|
65
65
|
@send
|
|
66
|
-
external put2: (cache, ~request: string, ~response: response) =>
|
|
66
|
+
external put2: (cache, ~request: string, ~response: response) => promise<unit> = "put"
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/delete)
|
|
70
70
|
*/
|
|
71
71
|
@send
|
|
72
|
-
external delete: (cache, ~request: request, ~options: cacheQueryOptions=?) =>
|
|
72
|
+
external delete: (cache, ~request: request, ~options: cacheQueryOptions=?) => promise<bool> =
|
|
73
73
|
"delete"
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/delete)
|
|
77
77
|
*/
|
|
78
78
|
@send
|
|
79
|
-
external delete2: (cache, ~request: string, ~options: cacheQueryOptions=?) =>
|
|
79
|
+
external delete2: (cache, ~request: string, ~options: cacheQueryOptions=?) => promise<bool> =
|
|
80
80
|
"delete"
|
|
81
81
|
|
|
82
82
|
/**
|
|
@@ -87,7 +87,7 @@ external keys: (
|
|
|
87
87
|
cache,
|
|
88
88
|
~request: request=?,
|
|
89
89
|
~options: cacheQueryOptions=?,
|
|
90
|
-
) =>
|
|
90
|
+
) => promise<array<request>> = "keys"
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Cache/keys)
|
|
@@ -97,4 +97,4 @@ external keys2: (
|
|
|
97
97
|
cache,
|
|
98
98
|
~request: string=?,
|
|
99
99
|
~options: cacheQueryOptions=?,
|
|
100
|
-
) =>
|
|
100
|
+
) => promise<array<request>> = "keys"
|
|
@@ -25,22 +25,22 @@ external match2: (
|
|
|
25
25
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/has)
|
|
26
26
|
*/
|
|
27
27
|
@send
|
|
28
|
-
external has: (cacheStorage, string) =>
|
|
28
|
+
external has: (cacheStorage, string) => promise<bool> = "has"
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/open)
|
|
32
32
|
*/
|
|
33
33
|
@send
|
|
34
|
-
external open_: (cacheStorage, string) =>
|
|
34
|
+
external open_: (cacheStorage, string) => promise<cache> = "open"
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/delete)
|
|
38
38
|
*/
|
|
39
39
|
@send
|
|
40
|
-
external delete: (cacheStorage, string) =>
|
|
40
|
+
external delete: (cacheStorage, string) => promise<bool> = "delete"
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CacheStorage/keys)
|
|
44
44
|
*/
|
|
45
45
|
@send
|
|
46
|
-
external keys: cacheStorage =>
|
|
46
|
+
external keys: cacheStorage => promise<array<string>> = "keys"
|
|
@@ -4,22 +4,22 @@ open ServiceWorkerAPI
|
|
|
4
4
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/enable)
|
|
5
5
|
*/
|
|
6
6
|
@send
|
|
7
|
-
external enable: navigationPreloadManager =>
|
|
7
|
+
external enable: navigationPreloadManager => promise<unit> = "enable"
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/disable)
|
|
11
11
|
*/
|
|
12
12
|
@send
|
|
13
|
-
external disable: navigationPreloadManager =>
|
|
13
|
+
external disable: navigationPreloadManager => promise<unit> = "disable"
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/setHeaderValue)
|
|
17
17
|
*/
|
|
18
18
|
@send
|
|
19
|
-
external setHeaderValue: (navigationPreloadManager, string) =>
|
|
19
|
+
external setHeaderValue: (navigationPreloadManager, string) => promise<unit> = "setHeaderValue"
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/getState)
|
|
23
23
|
*/
|
|
24
24
|
@send
|
|
25
|
-
external getState: navigationPreloadManager =>
|
|
25
|
+
external getState: navigationPreloadManager => promise<navigationPreloadState> = "getState"
|
|
@@ -13,7 +13,7 @@ external register: (
|
|
|
13
13
|
serviceWorkerContainer,
|
|
14
14
|
~scriptURL: string,
|
|
15
15
|
~options: registrationOptions=?,
|
|
16
|
-
) =>
|
|
16
|
+
) => promise<serviceWorkerRegistration> = "register"
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/getRegistration)
|
|
@@ -28,7 +28,7 @@ external getRegistration: (
|
|
|
28
28
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/getRegistrations)
|
|
29
29
|
*/
|
|
30
30
|
@send
|
|
31
|
-
external getRegistrations: serviceWorkerContainer =>
|
|
31
|
+
external getRegistrations: serviceWorkerContainer => promise<array<serviceWorkerRegistration>> =
|
|
32
32
|
"getRegistrations"
|
|
33
33
|
|
|
34
34
|
/**
|
|
@@ -10,13 +10,13 @@ include EventTarget.Impl({
|
|
|
10
10
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/update)
|
|
11
11
|
*/
|
|
12
12
|
@send
|
|
13
|
-
external update: serviceWorkerRegistration =>
|
|
13
|
+
external update: serviceWorkerRegistration => promise<unit> = "update"
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/unregister)
|
|
17
17
|
*/
|
|
18
18
|
@send
|
|
19
|
-
external unregister: serviceWorkerRegistration =>
|
|
19
|
+
external unregister: serviceWorkerRegistration => promise<bool> = "unregister"
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/showNotification)
|
|
@@ -26,7 +26,7 @@ external showNotification: (
|
|
|
26
26
|
serviceWorkerRegistration,
|
|
27
27
|
~title: string,
|
|
28
28
|
~options: notificationOptions=?,
|
|
29
|
-
) =>
|
|
29
|
+
) => promise<unit> = "showNotification"
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/getNotifications)
|
|
@@ -35,4 +35,4 @@ external showNotification: (
|
|
|
35
35
|
external getNotifications: (
|
|
36
36
|
serviceWorkerRegistration,
|
|
37
37
|
~filter: getNotificationOptions=?,
|
|
38
|
-
) =>
|
|
38
|
+
) => promise<array<notification>> = "getNotifications"
|
package/src/ServiceWorkerAPI.res
CHANGED
|
@@ -5,22 +5,22 @@ open FileAPI
|
|
|
5
5
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageManager/persisted)
|
|
6
6
|
*/
|
|
7
7
|
@send
|
|
8
|
-
external persisted: storageManager =>
|
|
8
|
+
external persisted: storageManager => promise<bool> = "persisted"
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageManager/persist)
|
|
12
12
|
*/
|
|
13
13
|
@send
|
|
14
|
-
external persist: storageManager =>
|
|
14
|
+
external persist: storageManager => promise<bool> = "persist"
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageManager/estimate)
|
|
18
18
|
*/
|
|
19
19
|
@send
|
|
20
|
-
external estimate: storageManager =>
|
|
20
|
+
external estimate: storageManager => promise<storageEstimate> = "estimate"
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/StorageManager/getDirectory)
|
|
24
24
|
*/
|
|
25
25
|
@send
|
|
26
|
-
external getDirectory: storageManager =>
|
|
26
|
+
external getDirectory: storageManager => promise<fileSystemDirectoryHandle> = "getDirectory"
|
|
@@ -9,15 +9,15 @@ type viewTransition = {
|
|
|
9
9
|
/**
|
|
10
10
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ViewTransition/updateCallbackDone)
|
|
11
11
|
*/
|
|
12
|
-
updateCallbackDone:
|
|
12
|
+
updateCallbackDone: promise<unit>,
|
|
13
13
|
/**
|
|
14
14
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ViewTransition/ready)
|
|
15
15
|
*/
|
|
16
|
-
ready:
|
|
16
|
+
ready: promise<unit>,
|
|
17
17
|
/**
|
|
18
18
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ViewTransition/finished)
|
|
19
19
|
*/
|
|
20
|
-
finished:
|
|
20
|
+
finished: promise<unit>,
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
type viewTransitionUpdateCallback =
|
|
23
|
+
type viewTransitionUpdateCallback = promise<JSON.t>
|
|
@@ -22,19 +22,19 @@ external getOutputTimestamp: audioContext => audioTimestamp = "getOutputTimestam
|
|
|
22
22
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioContext/resume)
|
|
23
23
|
*/
|
|
24
24
|
@send
|
|
25
|
-
external resume: audioContext =>
|
|
25
|
+
external resume: audioContext => promise<unit> = "resume"
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioContext/suspend)
|
|
29
29
|
*/
|
|
30
30
|
@send
|
|
31
|
-
external suspend: audioContext =>
|
|
31
|
+
external suspend: audioContext => promise<unit> = "suspend"
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioContext/close)
|
|
35
35
|
*/
|
|
36
36
|
@send
|
|
37
|
-
external close: audioContext =>
|
|
37
|
+
external close: audioContext => promise<unit> = "close"
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/AudioContext/createMediaElementSource)
|
|
@@ -21,16 +21,16 @@ external make2: (~numberOfChannels: int, ~length: int, ~sampleRate: float) => of
|
|
|
21
21
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OfflineAudioContext/startRendering)
|
|
22
22
|
*/
|
|
23
23
|
@send
|
|
24
|
-
external startRendering: offlineAudioContext =>
|
|
24
|
+
external startRendering: offlineAudioContext => promise<audioBuffer> = "startRendering"
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OfflineAudioContext/resume)
|
|
28
28
|
*/
|
|
29
29
|
@send
|
|
30
|
-
external resume: offlineAudioContext =>
|
|
30
|
+
external resume: offlineAudioContext => promise<unit> = "resume"
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OfflineAudioContext/suspend)
|
|
34
34
|
*/
|
|
35
35
|
@send
|
|
36
|
-
external suspend: (offlineAudioContext, float) =>
|
|
36
|
+
external suspend: (offlineAudioContext, float) => promise<unit> = "suspend"
|
|
@@ -9,5 +9,5 @@ Any failures in fetching the script or its dependencies will cause the returned
|
|
|
9
9
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Worklet/addModule)
|
|
10
10
|
*/
|
|
11
11
|
@send
|
|
12
|
-
external addModule: (worklet, ~moduleURL: string, ~options: workletOptions=?) =>
|
|
12
|
+
external addModule: (worklet, ~moduleURL: string, ~options: workletOptions=?) => promise<unit> =
|
|
13
13
|
"addModule"
|
|
@@ -10,7 +10,7 @@ external encrypt: (
|
|
|
10
10
|
~algorithm: algorithmIdentifier,
|
|
11
11
|
~key: cryptoKey,
|
|
12
12
|
~data: bufferSource,
|
|
13
|
-
) =>
|
|
13
|
+
) => promise<ArrayBuffer.t> = "encrypt"
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt)
|
|
@@ -21,7 +21,7 @@ external decrypt: (
|
|
|
21
21
|
~algorithm: algorithmIdentifier,
|
|
22
22
|
~key: cryptoKey,
|
|
23
23
|
~data: bufferSource,
|
|
24
|
-
) =>
|
|
24
|
+
) => promise<ArrayBuffer.t> = "decrypt"
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign)
|
|
@@ -32,7 +32,7 @@ external sign: (
|
|
|
32
32
|
~algorithm: algorithmIdentifier,
|
|
33
33
|
~key: cryptoKey,
|
|
34
34
|
~data: bufferSource,
|
|
35
|
-
) =>
|
|
35
|
+
) => promise<JSON.t> = "sign"
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify)
|
|
@@ -44,7 +44,7 @@ external verify: (
|
|
|
44
44
|
~key: cryptoKey,
|
|
45
45
|
~signature: bufferSource,
|
|
46
46
|
~data: bufferSource,
|
|
47
|
-
) =>
|
|
47
|
+
) => promise<JSON.t> = "verify"
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest)
|
|
@@ -54,7 +54,7 @@ external digest: (
|
|
|
54
54
|
subtleCrypto,
|
|
55
55
|
~algorithm: algorithmIdentifier,
|
|
56
56
|
~data: bufferSource,
|
|
57
|
-
) =>
|
|
57
|
+
) => promise<JSON.t> = "digest"
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)
|
|
@@ -65,7 +65,7 @@ external generateKey: (
|
|
|
65
65
|
~algorithm: algorithm,
|
|
66
66
|
~extractable: bool,
|
|
67
67
|
~keyUsages: array<keyUsage>,
|
|
68
|
-
) =>
|
|
68
|
+
) => promise<JSON.t> = "generateKey"
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)
|
|
@@ -76,7 +76,7 @@ external generateKey2: (
|
|
|
76
76
|
~algorithm: string,
|
|
77
77
|
~extractable: bool,
|
|
78
78
|
~keyUsages: array<keyUsage>,
|
|
79
|
-
) =>
|
|
79
|
+
) => promise<JSON.t> = "generateKey"
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey)
|
|
@@ -89,7 +89,7 @@ external deriveKey: (
|
|
|
89
89
|
~derivedKeyType: algorithmIdentifier,
|
|
90
90
|
~extractable: bool,
|
|
91
91
|
~keyUsages: array<keyUsage>,
|
|
92
|
-
) =>
|
|
92
|
+
) => promise<JSON.t> = "deriveKey"
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
95
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits)
|
|
@@ -100,7 +100,7 @@ external deriveBits: (
|
|
|
100
100
|
~algorithm: algorithm,
|
|
101
101
|
~baseKey: cryptoKey,
|
|
102
102
|
~length: int=?,
|
|
103
|
-
) =>
|
|
103
|
+
) => promise<ArrayBuffer.t> = "deriveBits"
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits)
|
|
@@ -111,7 +111,7 @@ external deriveBits2: (
|
|
|
111
111
|
~algorithm: string,
|
|
112
112
|
~baseKey: cryptoKey,
|
|
113
113
|
~length: int=?,
|
|
114
|
-
) =>
|
|
114
|
+
) => promise<ArrayBuffer.t> = "deriveBits"
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey)
|
|
@@ -124,13 +124,13 @@ external importKey: (
|
|
|
124
124
|
~algorithm: algorithmIdentifier,
|
|
125
125
|
~extractable: bool,
|
|
126
126
|
~keyUsages: array<keyUsage>,
|
|
127
|
-
) =>
|
|
127
|
+
) => promise<cryptoKey> = "importKey"
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
130
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey)
|
|
131
131
|
*/
|
|
132
132
|
@send
|
|
133
|
-
external exportKey: (subtleCrypto, ~format: keyFormat, ~key: cryptoKey) =>
|
|
133
|
+
external exportKey: (subtleCrypto, ~format: keyFormat, ~key: cryptoKey) => promise<JSON.t> =
|
|
134
134
|
"exportKey"
|
|
135
135
|
|
|
136
136
|
/**
|
|
@@ -143,7 +143,7 @@ external wrapKey: (
|
|
|
143
143
|
~key: cryptoKey,
|
|
144
144
|
~wrappingKey: cryptoKey,
|
|
145
145
|
~wrapAlgorithm: algorithm,
|
|
146
|
-
) =>
|
|
146
|
+
) => promise<JSON.t> = "wrapKey"
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey)
|
|
@@ -155,7 +155,7 @@ external wrapKey2: (
|
|
|
155
155
|
~key: cryptoKey,
|
|
156
156
|
~wrappingKey: cryptoKey,
|
|
157
157
|
~wrapAlgorithm: string,
|
|
158
|
-
) =>
|
|
158
|
+
) => promise<JSON.t> = "wrapKey"
|
|
159
159
|
|
|
160
160
|
/**
|
|
161
161
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey)
|
|
@@ -170,4 +170,4 @@ external unwrapKey: (
|
|
|
170
170
|
~unwrappedKeyAlgorithm: algorithmIdentifier,
|
|
171
171
|
~extractable: bool,
|
|
172
172
|
~keyUsages: array<keyUsage>,
|
|
173
|
-
) =>
|
|
173
|
+
) => promise<cryptoKey> = "unwrapKey"
|
|
@@ -9,7 +9,7 @@ external request: (
|
|
|
9
9
|
lockManager,
|
|
10
10
|
~name: string,
|
|
11
11
|
~callback: lockGrantedCallback,
|
|
12
|
-
) =>
|
|
12
|
+
) => promise<JSON.t> = "request"
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/LockManager/request)
|
|
@@ -20,10 +20,10 @@ external request2: (
|
|
|
20
20
|
~name: string,
|
|
21
21
|
~options: lockOptions,
|
|
22
22
|
~callback: lockGrantedCallback,
|
|
23
|
-
) =>
|
|
23
|
+
) => promise<JSON.t> = "request"
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/LockManager/query)
|
|
27
27
|
*/
|
|
28
28
|
@send
|
|
29
|
-
external query: lockManager =>
|
|
29
|
+
external query: lockManager => promise<lockManagerSnapshot> = "query"
|
package/src/WebLocksAPI.res
CHANGED