|
| 1 | +=== tests/cases/conformance/constEnums/constEnum3.ts === |
| 2 | +const enum TestType { foo, bar } |
| 3 | +>TestType : Symbol(TestType, Decl(constEnum3.ts, 0, 0)) |
| 4 | +>foo : Symbol(TestType.foo, Decl(constEnum3.ts, 0, 21)) |
| 5 | +>bar : Symbol(TestType.bar, Decl(constEnum3.ts, 0, 26)) |
| 6 | + |
| 7 | +type TestTypeStr = keyof typeof TestType; |
| 8 | +>TestTypeStr : Symbol(TestTypeStr, Decl(constEnum3.ts, 0, 32)) |
| 9 | +>TestType : Symbol(TestType, Decl(constEnum3.ts, 0, 0)) |
| 10 | + |
| 11 | +function f1(f: TestType) { } |
| 12 | +>f1 : Symbol(f1, Decl(constEnum3.ts, 1, 41)) |
| 13 | +>f : Symbol(f, Decl(constEnum3.ts, 3, 12)) |
| 14 | +>TestType : Symbol(TestType, Decl(constEnum3.ts, 0, 0)) |
| 15 | + |
| 16 | +function f2(f: TestTypeStr) { } |
| 17 | +>f2 : Symbol(f2, Decl(constEnum3.ts, 3, 28)) |
| 18 | +>f : Symbol(f, Decl(constEnum3.ts, 4, 12)) |
| 19 | +>TestTypeStr : Symbol(TestTypeStr, Decl(constEnum3.ts, 0, 32)) |
| 20 | + |
| 21 | +f1(TestType.foo) |
| 22 | +>f1 : Symbol(f1, Decl(constEnum3.ts, 1, 41)) |
| 23 | +>TestType.foo : Symbol(TestType.foo, Decl(constEnum3.ts, 0, 21)) |
| 24 | +>TestType : Symbol(TestType, Decl(constEnum3.ts, 0, 0)) |
| 25 | +>foo : Symbol(TestType.foo, Decl(constEnum3.ts, 0, 21)) |
| 26 | + |
| 27 | +f1(TestType.bar) |
| 28 | +>f1 : Symbol(f1, Decl(constEnum3.ts, 1, 41)) |
| 29 | +>TestType.bar : Symbol(TestType.bar, Decl(constEnum3.ts, 0, 26)) |
| 30 | +>TestType : Symbol(TestType, Decl(constEnum3.ts, 0, 0)) |
| 31 | +>bar : Symbol(TestType.bar, Decl(constEnum3.ts, 0, 26)) |
| 32 | + |
| 33 | +f2('foo') |
| 34 | +>f2 : Symbol(f2, Decl(constEnum3.ts, 3, 28)) |
| 35 | + |
| 36 | +f2('bar') |
| 37 | +>f2 : Symbol(f2, Decl(constEnum3.ts, 3, 28)) |
| 38 | + |
0 commit comments