summaryrefslogtreecommitdiff
path: root/tests/testdata/run/error_023_stack_async.ts
blob: fdabaa5df14646f0194948cf8651b4bfc91f84df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const p = (async () => {
  await Promise.resolve().then((): never => {
    throw new Error("async");
  });
})();

try {
  await p;
} catch (error) {
  if (error instanceof Error) {
    console.log(error.stack);
  }
  throw error;
}