mirror of
https://github.com/AmberGraceRblx/luau-promise.git
synced 2025-06-20 06:09:17 +00:00
Add docs warning
This commit is contained in:
parent
bb13a0e2b6
commit
f32ebd35bb
1 changed files with 4 additions and 0 deletions
|
@ -420,6 +420,10 @@ docs:
|
||||||
return "some", "values"
|
return "some", "values"
|
||||||
end)
|
end)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
::: warning
|
||||||
|
Promises are eager, so if you pass a Promise to `andThenReturn`, it will begin executing before `andThenReturn` is reached in the chain. Likewise, if you pass a Promise created from [[Promise.reject]] into `andThenReturn`, it's possible that this will trigger the unhandled rejection warning. If you need to return a Promise, it's usually best practice to use [[Promise.andThen]].
|
||||||
|
:::
|
||||||
params:
|
params:
|
||||||
- name: "..."
|
- name: "..."
|
||||||
type: "...any?"
|
type: "...any?"
|
||||||
|
|
Loading…
Reference in a new issue