TypeScript/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision8.ts
Sheetal Nandi 979e2bf7c4 Write synthesized node's text property instead of getting text from source file
This fixes issue of not being able to emit qualified expression correctly
2015-08-24 12:06:21 -07:00

27 lines
520 B
TypeScript

// @noemithelpers: true
// @experimentaldecorators: true
// @emitdecoratormetadata: true
// @target: es5
// @module: commonjs
// @filename: db.ts
export class db {
public doSomething() {
}
}
// @filename: service.ts
import database = require('./db');
function someDecorator(target) {
return target;
}
@someDecorator
class MyClass {
db: database.db;
constructor(db: database.db) { // no collision
this.db = db;
this.db.doSomething();
}
}
export {MyClass};