1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
const p = Promise.all([ Promise.resolve(), (async (): Promise<never> => { await Promise.resolve(); throw new Error("Promise.all()"); })(), ]); try { await p; } catch (error) { if (error instanceof Error) { console.log(error.stack); } throw error; }