mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
44 lines
784 B
TypeScript
44 lines
784 B
TypeScript
//// [tests/cases/conformance/classes/classStaticBlock/classStaticBlock23.ts] ////
|
|
|
|
//// [classStaticBlock23.ts]
|
|
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)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
//// [classStaticBlock23.js]
|
|
"use strict";
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
}
|