mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Instead of writing text from source file use text property to write text of synthesized node
Fixes #4364
This commit is contained in:
21
tests/cases/compiler/decoratorMetadataWithConstructorType.ts
Normal file
21
tests/cases/compiler/decoratorMetadataWithConstructorType.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
// @noemithelpers: true
|
||||
// @experimentaldecorators: true
|
||||
// @emitdecoratormetadata: true
|
||||
// @target: es5
|
||||
// @module: commonjs
|
||||
|
||||
declare var console: {
|
||||
log(msg: string): void;
|
||||
};
|
||||
|
||||
class A {
|
||||
constructor() { console.log('new A'); }
|
||||
}
|
||||
|
||||
function decorator(target: Object, propertyKey: string) {
|
||||
}
|
||||
|
||||
export class B {
|
||||
@decorator
|
||||
x: A = new A();
|
||||
}
|
||||
Reference in New Issue
Block a user