Update article.md
"allows to use" -> "allows us to use" "to use with await" -> "to use it with await"
This commit is contained in:
parent
d10b50ae7f
commit
4b124fb7df
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ But we can wrap it into an anonymous async function, like this:
|
|||
|
||||
````
|
||||
````smart header="`await` accepts \"thenables\""
|
||||
Like `promise.then`, `await` allows to use thenable objects (those with a callable `then` method). The idea is that a third-party object may not be a promise, but promise-compatible: if it supports `.then`, that's enough to use with `await`.
|
||||
Like `promise.then`, `await` allows us to use thenable objects (those with a callable `then` method). The idea is that a third-party object may not be a promise, but promise-compatible: if it supports `.then`, that's enough to use it with `await`.
|
||||
|
||||
Here's a demo `Thenable` class; the `await` below accepts its instances:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue