TypeScript/tests/cases/compiler/decoratorMetadataWithImportDeclarationNameCollision5.ts
2015-08-24 12:05:16 -07:00

27 lines
495 B
TypeScript

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