console.log("hello"); const foo = async (): Promise => { console.log("before error"); throw Error("error"); }; foo(); console.log("world");