mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
23 lines
321 B
TypeScript
23 lines
321 B
TypeScript
//// [tests/cases/conformance/classes/classStaticBlock/classStaticBlock28.ts] ////
|
|
|
|
//// [classStaticBlock28.ts]
|
|
let foo: number;
|
|
|
|
class C {
|
|
static {
|
|
foo = 1
|
|
}
|
|
}
|
|
|
|
console.log(foo)
|
|
|
|
//// [classStaticBlock28.js]
|
|
"use strict";
|
|
let foo;
|
|
class C {
|
|
}
|
|
(() => {
|
|
foo = 1;
|
|
})();
|
|
console.log(foo);
|