TypeScript/tests/cases/fourslash/importNameCodeFixNewImportNodeModules0.ts
Paul van Brenk 52ec508e27 Code fix for missing imports (#11768)
* Add codefix for missing imports + tests

* Re-order and cleanup

* refactor

* make tests pass

* Make import specifier for new imports more comprehensive

* Fix existing import cases

* refactor

* Fix multiple import statement case

* add multiple code fixes and code action filtering and polishing

* not using the generic verify method for import fixes.

* Correct insert position for new imports

* improve the code action filtering logic

* Fix line ending issue

* cache where we can
2016-11-16 16:01:16 -08:00

20 lines
406 B
TypeScript

/// <reference path="fourslash.ts" />
//// [|f1/*0*/();|]
// @Filename: ../package.json
//// { "dependencies": { "fake-module": "latest" } }
// @Filename: ../node_modules/fake-module/index.ts
//// export var v1 = 5;
//// export function f1();
// @Filename: ../node_modules/fake-module/package.json
//// {}
verify.importFixAtPosition([
`import { f1 } from "fake-module";
f1();`
]);