mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
24 lines
432 B
TypeScript
24 lines
432 B
TypeScript
//// [tests/cases/conformance/classes/classDeclarations/classDeclarationLoop.ts] ////
|
|
|
|
//// [classDeclarationLoop.ts]
|
|
const arr = [];
|
|
for (let i = 0; i < 10; ++i) {
|
|
class C {
|
|
prop = i;
|
|
}
|
|
arr.push(C);
|
|
}
|
|
|
|
|
|
//// [classDeclarationLoop.js]
|
|
"use strict";
|
|
const arr = [];
|
|
for (let i = 0; i < 10; ++i) {
|
|
class C {
|
|
constructor() {
|
|
this.prop = i;
|
|
}
|
|
}
|
|
arr.push(C);
|
|
}
|