Skip to content

Commit f80c34f

Browse files
committed
Promise.t -> promise
1 parent ae83778 commit f80c34f

File tree

63 files changed

+214
-214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+214
-214
lines changed

docs/content/docs/contributing/code-generation.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ For example the `window.fetch` function was generated as:
1616
*/
1717
@send
1818
external fetch: (window, ~input: request, ~init: requestInit=?)
19-
=> Promise.t<response> = "fetch"
19+
=> promise<response> = "fetch"
2020
2121
/**
2222
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Window/fetch)
2323
*/
2424
@send
2525
external fetch2: (window, ~input: string, ~init: requestInit=?)
26-
=> Promise.t<response> = "fetch"
26+
=> promise<response> = "fetch"
2727
```
2828

2929
While not that bad and usable, it can be improved:
@@ -39,12 +39,12 @@ While not that bad and usable, it can be improved:
3939
/** TODO: add better docs */
4040
@send
4141
external fetch: (window, string, ~init: requestInit=?)
42-
=> Promise.t<response> = "fetch"
42+
=> promise<response> = "fetch"
4343
4444
/** TODO: add better docs */
4545
@send
4646
external fetch_withRequest: (window, request, ~init: requestInit=?)
47-
=> Promise.t<response> = "fetch"
47+
=> promise<response> = "fetch"
4848
```
4949

5050
Once these changes are made, the bindings can be tested and then committed to the repository.

docs/content/docs/contributing/documentation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ window->Window.fetch("https://rescript-lang.org")
4242
*/
4343
@send
4444
external fetch: (window, string, ~init: requestInit=?)
45-
=> Promise.t<response> = "fetch"
45+
=> promise<response> = "fetch"
4646
````

src/CSSFontLoadingAPI.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ type rec fontFace = {
7070
/**
7171
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/loaded)
7272
*/
73-
loaded: Promise.t<fontFace>,
73+
loaded: promise<fontFace>,
7474
}
7575

7676
/**
@@ -81,7 +81,7 @@ type rec fontFaceSet = {
8181
/**
8282
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/ready)
8383
*/
84-
ready: Promise.t<fontFaceSet>,
84+
ready: promise<fontFaceSet>,
8585
/**
8686
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/status)
8787
*/

src/CSSFontLoadingAPI/FontFace.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ external make3: (
3131
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFace/load)
3232
*/
3333
@send
34-
external load: fontFace => Promise.t<fontFace> = "load"
34+
external load: fontFace => promise<fontFace> = "load"

src/CSSFontLoadingAPI/FontFaceSet.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ external clear: fontFaceSet => unit = "clear"
2727
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/load)
2828
*/
2929
@send
30-
external load: (fontFaceSet, ~font: string, ~text: string=?) => Promise.t<array<fontFace>> = "load"
30+
external load: (fontFaceSet, ~font: string, ~text: string=?) => promise<array<fontFace>> = "load"
3131

3232
/**
3333
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FontFaceSet/check)

src/CanvasAPI/OffscreenCanvas.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,5 @@ The argument, if provided, is a dictionary that controls the encoding options of
8787
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/convertToBlob)
8888
*/
8989
@send
90-
external convertToBlob: (offscreenCanvas, ~options: imageEncodeOptions=?) => Promise.t<blob> =
90+
external convertToBlob: (offscreenCanvas, ~options: imageEncodeOptions=?) => promise<blob> =
9191
"convertToBlob"

src/ClipboardAPI/Clipboard.res

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ include EventTarget.Impl({
88
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clipboard/read)
99
*/
1010
@send
11-
external read: clipboard => Promise.t<array<clipboardItem>> = "read"
11+
external read: clipboard => promise<array<clipboardItem>> = "read"
1212

1313
/**
1414
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clipboard/readText)
1515
*/
1616
@send
17-
external readText: clipboard => Promise.t<string> = "readText"
17+
external readText: clipboard => promise<string> = "readText"
1818

1919
/**
2020
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clipboard/write)
2121
*/
2222
@send
23-
external write: (clipboard, array<clipboardItem>) => Promise.t<unit> = "write"
23+
external write: (clipboard, array<clipboardItem>) => promise<unit> = "write"
2424

2525
/**
2626
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Clipboard/writeText)
2727
*/
2828
@send
29-
external writeText: (clipboard, string) => Promise.t<unit> = "writeText"
29+
external writeText: (clipboard, string) => promise<unit> = "writeText"

src/ClipboardAPI/ClipboardItem.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ external make: (~items: any, ~options: clipboardItemOptions=?) => clipboardItem
1212
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ClipboardItem/getType)
1313
*/
1414
@send
15-
external getType: (clipboardItem, string) => Promise.t<blob> = "getType"
15+
external getType: (clipboardItem, string) => promise<blob> = "getType"
1616

1717
/**
1818
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/ClipboardItem/supports_static)

src/CredentialManagementAPI/CredentialsContainer.res

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ open CredentialManagementAPI
77
external get: (
88
credentialsContainer,
99
~options: credentialRequestOptions=?,
10-
) => Promise.t<credential> = "get"
10+
) => promise<credential> = "get"
1111

1212
/**
1313
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/store)
1414
*/
1515
@send
16-
external store: (credentialsContainer, credential) => Promise.t<unit> = "store"
16+
external store: (credentialsContainer, credential) => promise<unit> = "store"
1717

1818
/**
1919
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/create)
@@ -22,10 +22,10 @@ external store: (credentialsContainer, credential) => Promise.t<unit> = "store"
2222
external create: (
2323
credentialsContainer,
2424
~options: credentialCreationOptions=?,
25-
) => Promise.t<credential> = "create"
25+
) => promise<credential> = "create"
2626

2727
/**
2828
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CredentialsContainer/preventSilentAccess)
2929
*/
3030
@send
31-
external preventSilentAccess: credentialsContainer => Promise.t<unit> = "preventSilentAccess"
31+
external preventSilentAccess: credentialsContainer => promise<unit> = "preventSilentAccess"

src/DOMAPI.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9524,11 +9524,11 @@ type rec animation = {
95249524
/**
95259525
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Animation/ready)
95269526
*/
9527-
ready: Promise.t<animation>,
9527+
ready: promise<animation>,
95289528
/**
95299529
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Animation/finished)
95309530
*/
9531-
finished: Promise.t<animation>,
9531+
finished: promise<animation>,
95329532
/**
95339533
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Animation/startTime)
95349534
*/

src/DOMAPI/CSSStyleSheet.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ external deleteRule: (cssStyleSheet, int) => unit = "deleteRule"
2323
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/replace)
2424
*/
2525
@send
26-
external replace: (cssStyleSheet, string) => Promise.t<cssStyleSheet> = "replace"
26+
external replace: (cssStyleSheet, string) => promise<cssStyleSheet> = "replace"
2727

2828
/**
2929
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CSSStyleSheet/replaceSync)

src/DOMAPI/CustomElementRegistry.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ external getName: (customElementRegistry, customElementConstructor) => string =
2121
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry/whenDefined)
2222
*/
2323
@send
24-
external whenDefined: (customElementRegistry, string) => Promise.t<customElementConstructor> =
24+
external whenDefined: (customElementRegistry, string) => promise<customElementConstructor> =
2525
"whenDefined"
2626

2727
/**

src/DOMAPI/Document.res

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ Stops document's fullscreen element from being displayed fullscreen and resolves
360360
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/exitFullscreen)
361361
*/
362362
@send
363-
external exitFullscreen: document => Promise.t<unit> = "exitFullscreen"
363+
external exitFullscreen: document => promise<unit> = "exitFullscreen"
364364

365365
/**
366366
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/parseHTMLUnsafe_static)
@@ -432,7 +432,7 @@ external hasFocus: document => bool = "hasFocus"
432432
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/exitPictureInPicture)
433433
*/
434434
@send
435-
external exitPictureInPicture: document => Promise.t<unit> = "exitPictureInPicture"
435+
external exitPictureInPicture: document => promise<unit> = "exitPictureInPicture"
436436

437437
/**
438438
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/exitPointerLock)
@@ -451,10 +451,10 @@ external getSelection: document => selection = "getSelection"
451451
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/hasStorageAccess)
452452
*/
453453
@send
454-
external hasStorageAccess: document => Promise.t<bool> = "hasStorageAccess"
454+
external hasStorageAccess: document => promise<bool> = "hasStorageAccess"
455455

456456
/**
457457
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Document/requestStorageAccess)
458458
*/
459459
@send
460-
external requestStorageAccess: document => Promise.t<unit> = "requestStorageAccess"
460+
external requestStorageAccess: document => promise<unit> = "requestStorageAccess"

src/DOMAPI/Element.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,14 +353,14 @@ When supplied, options's navigationUI member indicates whether showing navigatio
353353
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/requestFullscreen)
354354
*/
355355
@send
356-
external requestFullscreen: (T.t, ~options: fullscreenOptions=?) => Promise.t<unit> =
356+
external requestFullscreen: (T.t, ~options: fullscreenOptions=?) => promise<unit> =
357357
"requestFullscreen"
358358

359359
/**
360360
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Element/requestPointerLock)
361361
*/
362362
@send
363-
external requestPointerLock: (T.t, ~options: pointerLockOptions=?) => Promise.t<unit> =
363+
external requestPointerLock: (T.t, ~options: pointerLockOptions=?) => promise<unit> =
364364
"requestPointerLock"
365365

366366
/**

src/DOMAPI/HTMLImageElement.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ include HTMLElement.Impl({
88
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLImageElement/decode)
99
*/
1010
@send
11-
external decode: htmlImageElement => Promise.t<unit> = "decode"
11+
external decode: htmlImageElement => promise<unit> = "decode"

src/DOMAPI/HTMLMediaElement.res

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ Loads and starts playback of a media resource.
5656
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/play)
5757
*/
5858
@send
59-
external play: T.t => Promise.t<unit> = "play"
59+
external play: T.t => promise<unit> = "play"
6060

6161
/**
6262
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/setMediaKeys)
6363
*/
6464
@send
65-
external setMediaKeys: (T.t, mediaKeys) => Promise.t<unit> = "setMediaKeys"
65+
external setMediaKeys: (T.t, mediaKeys) => promise<unit> = "setMediaKeys"
6666

6767
/**
6868
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/setSinkId)
6969
*/
7070
@send
71-
external setSinkId: (T.t, string) => Promise.t<unit> = "setSinkId"
71+
external setSinkId: (T.t, string) => promise<unit> = "setSinkId"
7272
}
7373

7474
include Impl({

src/DOMAPI/HTMLVideoElement.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ external getVideoPlaybackQuality: htmlVideoElement => videoPlaybackQuality =
1616
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement/requestPictureInPicture)
1717
*/
1818
@send
19-
external requestPictureInPicture: htmlVideoElement => Promise.t<pictureInPictureWindow> =
19+
external requestPictureInPicture: htmlVideoElement => promise<pictureInPictureWindow> =
2020
"requestPictureInPicture"
2121

2222
/**

src/DOMAPI/Navigator.res

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ open WebMIDIAPI
99
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/setAppBadge)
1010
*/
1111
@send
12-
external setAppBadge: (navigator, ~contents: int=?) => Promise.t<unit> = "setAppBadge"
12+
external setAppBadge: (navigator, ~contents: int=?) => promise<unit> = "setAppBadge"
1313

1414
/**
1515
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/clearAppBadge)
1616
*/
1717
@send
18-
external clearAppBadge: navigator => Promise.t<unit> = "clearAppBadge"
18+
external clearAppBadge: navigator => promise<unit> = "clearAppBadge"
1919

2020
/**
2121
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/registerProtocolHandler)
@@ -74,7 +74,7 @@ external requestMediaKeySystemAccess: (
7474
navigator,
7575
~keySystem: string,
7676
~supportedConfigurations: array<mediaKeySystemConfiguration>,
77-
) => Promise.t<mediaKeySystemAccess> = "requestMediaKeySystemAccess"
77+
) => promise<mediaKeySystemAccess> = "requestMediaKeySystemAccess"
7878

7979
/**
8080
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/getGamepads)
@@ -98,7 +98,7 @@ external vibrate2: (navigator, array<int>) => bool = "vibrate"
9898
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/share)
9999
*/
100100
@send
101-
external share: (navigator, ~data: shareData=?) => Promise.t<unit> = "share"
101+
external share: (navigator, ~data: shareData=?) => promise<unit> = "share"
102102

103103
/**
104104
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/canShare)
@@ -110,5 +110,5 @@ external canShare: (navigator, ~data: shareData=?) => bool = "canShare"
110110
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/Navigator/requestMIDIAccess)
111111
*/
112112
@send
113-
external requestMIDIAccess: (navigator, ~options: midiOptions=?) => Promise.t<midiAccess> =
113+
external requestMIDIAccess: (navigator, ~options: midiOptions=?) => promise<midiAccess> =
114114
"requestMIDIAccess"

src/DOMAPI/VideoFrame.res

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ external copyTo: (
7676
videoFrame,
7777
~destination: ArrayBuffer.t,
7878
~options: videoFrameCopyToOptions=?,
79-
) => Promise.t<array<planeLayout>> = "copyTo"
79+
) => promise<array<planeLayout>> = "copyTo"
8080

8181
/**
8282
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/copyTo)
@@ -86,7 +86,7 @@ external copyTo2: (
8686
videoFrame,
8787
~destination: sharedArrayBuffer,
8888
~options: videoFrameCopyToOptions=?,
89-
) => Promise.t<array<planeLayout>> = "copyTo"
89+
) => promise<array<planeLayout>> = "copyTo"
9090

9191
/**
9292
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/copyTo)
@@ -96,7 +96,7 @@ external copyTo3: (
9696
videoFrame,
9797
~destination: DataView.t,
9898
~options: videoFrameCopyToOptions=?,
99-
) => Promise.t<array<planeLayout>> = "copyTo"
99+
) => promise<array<planeLayout>> = "copyTo"
100100

101101
/**
102102
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/VideoFrame/clone)

0 commit comments

Comments
 (0)