This commit is contained in:
Ilya Kantor 2019-10-30 16:56:59 +03:00
parent 601d9583f7
commit 71fb491016

View file

@ -168,7 +168,7 @@ async function f() {
f(); f();
``` ```
If `await` gets a non-promise object with `.then`, it calls that method providing native functions `resolve`, `reject` as arguments. Then `await` waits until one of them is called (in the example above it happens in the line `(*)`) and then proceeds with the result. If `await` gets a non-promise object with `.then`, it calls that method providing built-in functions `resolve`, `reject` as arguments (just as it does for a regular `Promise` executor). Then `await` waits until one of them is called (in the example above it happens in the line `(*)`) and then proceeds with the result.
```` ````
````smart header="Async class methods" ````smart header="Async class methods"