TypeScript/tests/baselines/reference/decoratorMetadataWithImportDeclarationNameCollision4.types
Anders Hejlsberg a4f9bf0fce
Create type aliases for unresolved type symbols (#45976)
* Create type aliases for unresolved type symbols

* Accept new baselines

* Update fourslash tests

* Unresolved import aliases create tagged unresolved symbols

* Add comments

* Accept new baselines

* Add fourslash tests
2021-09-23 13:21:27 -07:00

54 lines
880 B
Plaintext

=== tests/cases/compiler/db.ts ===
export class db {
>db : db
public doSomething() {
>doSomething : () => void
}
}
=== tests/cases/compiler/service.ts ===
import db from './db'; // error no default export
>db : any
function someDecorator(target) {
>someDecorator : (target: any) => any
>target : any
return target;
>target : any
}
@someDecorator
>someDecorator : (target: any) => any
class MyClass {
>MyClass : MyClass
db: db.db;
>db : db.db
>db : any
constructor(db: db.db) {
>db : db.db
>db : any
this.db = db;
>this.db = db : db.db
>this.db : db.db
>this : this
>db : db.db
>db : db.db
this.db.doSomething();
>this.db.doSomething() : any
>this.db.doSomething : any
>this.db : db.db
>this : this
>db : db.db
>doSomething : any
}
}
export {MyClass};
>MyClass : typeof MyClass