|
| 1 | +//// [tests/cases/compiler/expandoFunctionExpressionsWithDynamicNames2.ts] //// |
| 2 | + |
| 3 | +=== expandoFunctionExpressionsWithDynamicNames2.ts === |
| 4 | +const mySymbol = Symbol(); |
| 5 | +>mySymbol : Symbol(mySymbol, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 0, 5)) |
| 6 | +>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2019.symbol.d.ts, --, --)) |
| 7 | + |
| 8 | +interface Foo { |
| 9 | +>Foo : Symbol(Foo, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 0, 26)) |
| 10 | + |
| 11 | + (): void; |
| 12 | + [mySymbol]: true; |
| 13 | +>[mySymbol] : Symbol(Foo[mySymbol], Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 2, 11)) |
| 14 | +>mySymbol : Symbol(mySymbol, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 0, 5)) |
| 15 | +} |
| 16 | +const foo: Foo = () => {}; |
| 17 | +>foo : Symbol(foo, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 5, 5), Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 5, 26)) |
| 18 | +>Foo : Symbol(Foo, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 0, 26)) |
| 19 | + |
| 20 | +foo[mySymbol] = true; |
| 21 | +>foo : Symbol(foo, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 5, 5), Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 5, 26)) |
| 22 | +>mySymbol : Symbol(mySymbol, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 0, 5)) |
| 23 | + |
| 24 | +interface Bar { |
| 25 | +>Bar : Symbol(Bar, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 6, 21)) |
| 26 | + |
| 27 | + (): void; |
| 28 | + test: true; |
| 29 | +>test : Symbol(Bar.test, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 9, 11)) |
| 30 | +} |
| 31 | +const t = "test" as const; |
| 32 | +>t : Symbol(t, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 12, 5)) |
| 33 | +>const : Symbol(const) |
| 34 | + |
| 35 | +const bar: Bar = () => {}; |
| 36 | +>bar : Symbol(bar, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 13, 5), Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 13, 26)) |
| 37 | +>Bar : Symbol(Bar, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 6, 21)) |
| 38 | + |
| 39 | +bar[t] = true; |
| 40 | +>bar : Symbol(bar, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 13, 5), Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 13, 26)) |
| 41 | +>t : Symbol(t, Decl(expandoFunctionExpressionsWithDynamicNames2.ts, 12, 5)) |
| 42 | + |
0 commit comments