mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
25 lines
611 B
Plaintext
25 lines
611 B
Plaintext
blockScopedEnumVariablesUseBeforeDef.ts(2,12): error TS2450: Enum 'E' used before its declaration.
|
|
|
|
|
|
==== blockScopedEnumVariablesUseBeforeDef.ts (1 errors) ====
|
|
function foo1() {
|
|
return E.A
|
|
~
|
|
!!! error TS2450: Enum 'E' used before its declaration.
|
|
!!! related TS2728 blockScopedEnumVariablesUseBeforeDef.ts:3:10: 'E' is declared here.
|
|
enum E { A }
|
|
}
|
|
|
|
function foo2() {
|
|
return E.A
|
|
const enum E { A }
|
|
}
|
|
|
|
const config = {
|
|
a: AfterObject.A,
|
|
};
|
|
|
|
const enum AfterObject {
|
|
A = 2,
|
|
}
|
|
|