Skip to content

Commit e13fb00

Browse files
authored
Merge pull request #24 from rescript-lang/promise
Promise.t -> promise
2 parents ae83778 + f80c34f commit e13fb00

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
*/

0 commit comments

Comments
 (0)