* Use host to improve SymbolTracker implementation * inferFromUsage: Provide a better moduleResolverHost This produces better paths on import types.
26 lines
528 B
TypeScript
26 lines
528 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @noImplicitAny: true
|
|
|
|
// @Filename: /a.ts
|
|
////export class D {}
|
|
////export default new D();
|
|
|
|
// @Filename: /b.ts
|
|
////export class C {
|
|
//// [|set x(val) { val; }|]
|
|
//// method() { this.x = import("./a"); }
|
|
////}
|
|
|
|
goTo.file("/b.ts");
|
|
verify.codeFix({
|
|
index: 0,
|
|
description: "Infer type of 'x' from usage",
|
|
newFileContent:
|
|
`export class C {
|
|
set x(val: Promise<typeof import("./a")>) { val; }
|
|
method() { this.x = import("./a"); }
|
|
}`,
|
|
});
|
|
|