|
| 1 | +=== tests/cases/compiler/decoratorMetadataWithConstructorType.ts === |
| 2 | + |
| 3 | +declare var console: { |
| 4 | +>console : Symbol(console, Decl(decoratorMetadataWithConstructorType.ts, 1, 11)) |
| 5 | + |
| 6 | + log(msg: string): void; |
| 7 | +>log : Symbol(log, Decl(decoratorMetadataWithConstructorType.ts, 1, 22)) |
| 8 | +>msg : Symbol(msg, Decl(decoratorMetadataWithConstructorType.ts, 2, 8)) |
| 9 | + |
| 10 | +}; |
| 11 | + |
| 12 | +class A { |
| 13 | +>A : Symbol(A, Decl(decoratorMetadataWithConstructorType.ts, 3, 2)) |
| 14 | + |
| 15 | + constructor() { console.log('new A'); } |
| 16 | +>console.log : Symbol(log, Decl(decoratorMetadataWithConstructorType.ts, 1, 22)) |
| 17 | +>console : Symbol(console, Decl(decoratorMetadataWithConstructorType.ts, 1, 11)) |
| 18 | +>log : Symbol(log, Decl(decoratorMetadataWithConstructorType.ts, 1, 22)) |
| 19 | +} |
| 20 | + |
| 21 | +function decorator(target: Object, propertyKey: string) { |
| 22 | +>decorator : Symbol(decorator, Decl(decoratorMetadataWithConstructorType.ts, 7, 1)) |
| 23 | +>target : Symbol(target, Decl(decoratorMetadataWithConstructorType.ts, 9, 19)) |
| 24 | +>Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11)) |
| 25 | +>propertyKey : Symbol(propertyKey, Decl(decoratorMetadataWithConstructorType.ts, 9, 34)) |
| 26 | +} |
| 27 | + |
| 28 | +export class B { |
| 29 | +>B : Symbol(B, Decl(decoratorMetadataWithConstructorType.ts, 10, 1)) |
| 30 | + |
| 31 | + @decorator |
| 32 | +>decorator : Symbol(decorator, Decl(decoratorMetadataWithConstructorType.ts, 7, 1)) |
| 33 | + |
| 34 | + x: A = new A(); |
| 35 | +>x : Symbol(x, Decl(decoratorMetadataWithConstructorType.ts, 12, 16)) |
| 36 | +>A : Symbol(A, Decl(decoratorMetadataWithConstructorType.ts, 3, 2)) |
| 37 | +>A : Symbol(A, Decl(decoratorMetadataWithConstructorType.ts, 3, 2)) |
| 38 | +} |
| 39 | + |
0 commit comments