TypeScript/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.errors.txt
Sheetal Nandi 3ca08916d4 When emitting metadata about type, Use object type if the type cant be resolved
This could be true if expression cannot be resolved resulting in error
2015-08-24 12:07:14 -07:00

27 lines
722 B
Plaintext

tests/cases/compiler/service.ts(1,8): error TS1192: Module '"tests/cases/compiler/db"' has no default export.
==== tests/cases/compiler/db.ts (0 errors) ====
export class db {
public doSomething() {
}
}
==== tests/cases/compiler/service.ts (1 errors) ====
import db from './db'; // error no default export
~~
!!! error TS1192: Module '"tests/cases/compiler/db"' has no default export.
function someDecorator(target) {
return target;
}
@someDecorator
class MyClass {
db: db.db;
constructor(db: db.db) {
this.db = db;
this.db.doSomething();
}
}
export {MyClass};