If I am not mistaken:
async function foo() {
await bar();
baz();
}
Corresponds to:
function foo() {
return new Promise((resolve) => {
resolve(bar());
}).then(() => {
baz();
});
}
So () => baz(); goes to Microtask Queue.
But what goes to Microtask Queue if we have try/catch block inside async function, for example:
async function foo() {
try {
await bar();
} catch () {
baz();
}
qux();
}