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