mirror of
https://github.com/swc-project/swc.git
synced 2024-11-30 15:23:33 +03:00
22 lines
306 B
TypeScript
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)
|
|
}
|
|
}
|
|
}
|
|
}
|