TypeScript/tests/cases/fourslash/importNameCodeFix_symlink.ts
Wesley Wigham 59854bbd55
Inspect all possible module paths when looking for the best one to create a specifier with (#25850)
* Inspect all possible specifier paths when looking for the best one

* Add missing secondary option from test
2018-07-24 13:56:21 -07:00

26 lines
465 B
TypeScript

/// <reference path="fourslash.ts" />
// @moduleResolution: node
// @noLib: true
// @Filename: /node_modules/real/index.d.ts
// @Symlink: /node_modules/link/index.d.ts
////export const foo: number;
// @Filename: /a.ts
////import { foo } from "link";
// @Filename: /b.ts
////[|foo;|]
// Uses "link" instead of "real" because `a` did.
goTo.file("/b.ts");
verify.importFixAtPosition([
`import { foo } from "link";
foo;`,
`import { foo } from "real";
foo;`,
]);