mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
46 lines
875 B
TypeScript
46 lines
875 B
TypeScript
//// [tests/cases/compiler/blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.ts] ////
|
|
|
|
//// [blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.ts]
|
|
function foo1() {
|
|
return E.A
|
|
enum E { A }
|
|
}
|
|
|
|
function foo2() {
|
|
return E.A
|
|
const enum E { A }
|
|
}
|
|
|
|
const config = {
|
|
a: AfterObject.A,
|
|
};
|
|
|
|
const enum AfterObject {
|
|
A = 2,
|
|
}
|
|
|
|
|
|
//// [blockScopedEnumVariablesUseBeforeDef_verbatimModuleSyntax.js]
|
|
"use strict";
|
|
function foo1() {
|
|
return E.A;
|
|
let E;
|
|
(function (E) {
|
|
E[E["A"] = 0] = "A";
|
|
})(E || (E = {}));
|
|
}
|
|
function foo2() {
|
|
return E.A;
|
|
let E;
|
|
(function (E) {
|
|
E[E["A"] = 0] = "A";
|
|
})(E || (E = {}));
|
|
}
|
|
const config = {
|
|
a: AfterObject.A,
|
|
};
|
|
var AfterObject;
|
|
(function (AfterObject) {
|
|
AfterObject[AfterObject["A"] = 2] = "A";
|
|
})(AfterObject || (AfterObject = {}));
|