|
| 1 | +=== tests/cases/conformance/decorators/decoratorInAmbientContext.ts === |
| 2 | +declare function decorator(target: any, key: any): any; |
| 3 | +>decorator : Symbol(decorator, Decl(decoratorInAmbientContext.ts, 0, 0)) |
| 4 | +>target : Symbol(target, Decl(decoratorInAmbientContext.ts, 0, 27)) |
| 5 | +>key : Symbol(key, Decl(decoratorInAmbientContext.ts, 0, 39)) |
| 6 | + |
| 7 | +const b = Symbol('b'); |
| 8 | +>b : Symbol(b, Decl(decoratorInAmbientContext.ts, 2, 5)) |
| 9 | +>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, --, --)) |
| 10 | + |
| 11 | +class Foo { |
| 12 | +>Foo : Symbol(Foo, Decl(decoratorInAmbientContext.ts, 2, 22)) |
| 13 | + |
| 14 | + @decorator declare a: number; |
| 15 | +>decorator : Symbol(decorator, Decl(decoratorInAmbientContext.ts, 0, 0)) |
| 16 | +>a : Symbol(Foo.a, Decl(decoratorInAmbientContext.ts, 3, 11)) |
| 17 | + |
| 18 | + @decorator declare [b]: number; |
| 19 | +>decorator : Symbol(decorator, Decl(decoratorInAmbientContext.ts, 0, 0)) |
| 20 | +>[b] : Symbol(Foo[b], Decl(decoratorInAmbientContext.ts, 4, 33)) |
| 21 | +>b : Symbol(b, Decl(decoratorInAmbientContext.ts, 2, 5)) |
| 22 | +} |
| 23 | + |
0 commit comments