|
|
|
|
|
by seniorsassycat
1519 days ago
|
|
Promises are flat, so if a async function or promise callback returns a promise the result is just a promise, not promise<promise>. Using async for functions that do not use await is still a good idea because thrown errors are converted to rejected promises. `return await` can be useful because it's a signal that the value is async, causes the current function to be included in the async stack trace, and completes local try/catch/finally blocks when the promise resolves |
|