TypeScript/tests/cases/fourslash/importNameCodeFix_symlink_own_package.ts
Andy 9c9f3e3cf9
importFixes: When one file redirects to another, consider both for global import specifiers (#25834)
* importFixes: When one file redirects to another, consider both for global import specifiers

* Add test for #26044

* Avoid a symlinked package globally importing itself (fixes another case of #26044)

* Compare to node_modules with getCanonicalFileName
2018-07-31 17:28:56 -07:00

22 lines
437 B
TypeScript

/// <reference path="fourslash.ts" />
// @Filename: /packages/b/b0.ts
// @Symlink: /node_modules/b/b0.ts
////x;
// @Filename: /packages/b/b1.ts
// @Symlink: /node_modules/b/b1.ts
////import { a } from "a";
////export const x = 0;
// @Filename: /packages/a/index.d.ts
// @Symlink: /node_modules/a/index.d.ts
////export const a: number;
goTo.file("/packages/b/b0.ts");
verify.importFixAtPosition([
`import { x } from "./b1";
x;`,
]);