mirror of
https://github.com/denoland/deno.git
synced 2024-10-31 09:14:20 -04:00
14 lines
238 B
TypeScript
14 lines
238 B
TypeScript
const p = Promise.all([
|
|
Promise.resolve(),
|
|
(async (): Promise<never> => {
|
|
await Promise.resolve();
|
|
throw new Error("Promise.all()");
|
|
})(),
|
|
]);
|
|
|
|
try {
|
|
await p;
|
|
} catch (error) {
|
|
console.log(error.stack);
|
|
throw error;
|
|
}
|