2018-01-03 17:20:53 +01:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
|
|
|
|
// @moduleResolution: node
|
|
|
|
// @noLib: true
|
2018-08-28 22:03:24 +02:00
|
|
|
// @jsx: preserve
|
2018-01-03 17:20:53 +01:00
|
|
|
|
|
|
|
// @Filename: /a.ts
|
|
|
|
////export function a() {}
|
|
|
|
|
|
|
|
// @Filename: /b.ts
|
|
|
|
////export function b() {}
|
|
|
|
|
2018-08-28 22:03:24 +02:00
|
|
|
// @Filename: /c.tsx
|
|
|
|
////export function c() {}
|
|
|
|
|
2018-01-03 17:20:53 +01:00
|
|
|
// @Filename: /c.ts
|
|
|
|
////import * as g from "global"; // Global imports skipped
|
|
|
|
////import { a } from "./a.js";
|
|
|
|
////import { a as a2 } from "./a"; // Ignored, only the first relative import is considered
|
2018-08-28 22:03:24 +02:00
|
|
|
////b; c;
|
2018-01-03 17:20:53 +01:00
|
|
|
|
|
|
|
goTo.file("/c.ts");
|
2018-08-28 22:03:24 +02:00
|
|
|
verify.codeFixAll({
|
|
|
|
fixId: "fixMissingImport",
|
|
|
|
fixAllDescription: "Add all missing imports",
|
|
|
|
newFileContent:
|
2018-05-03 21:58:42 +02:00
|
|
|
`import * as g from "global"; // Global imports skipped
|
|
|
|
import { a } from "./a.js";
|
|
|
|
import { a as a2 } from "./a"; // Ignored, only the first relative import is considered
|
|
|
|
import { b } from "./b.js";
|
2018-08-28 22:03:24 +02:00
|
|
|
import { c } from "./c.jsx";
|
|
|
|
b; c;`,
|
|
|
|
});
|