swc/crates/swc_ecma_parser/tests/tsc/classStaticBlock23.ts

22 lines
306 B
TypeScript

// @target: esnext, es2022
const nums = [1, 2, 3].map(n => Promise.resolve(n))
class C {
static {
for await (const nn of nums) {
console.log(nn)
}
}
}
async function foo () {
class C {
static {
for await (const nn of nums) {
console.log(nn)
}
}
}
}