TypeScript/tests/cases/fourslash/importNameCodeFixNewImportTypeRoots0.ts
Andy b94061c587
getEditsForFileRename: Avoid changing import specifier ending (#26177)
* getEditsForFileRename: Avoid changing import specifier ending

* Support .json and .jsx extensions

* Restore typeRoots tests

* Fix json test

* When --jsx preserve is set, import ".tsx" file with ".jsx" extension

* Support ending preference in UserPreferences
2018-08-28 13:03:24 -07:00

24 lines
487 B
TypeScript

/// <reference path="fourslash.ts" />
// @Filename: a/f1.ts
//// [|foo/*0*/();|]
// @Filename: types/random/index.ts
//// export function foo() {};
// @Filename: tsconfig.json
//// {
//// "compilerOptions": {
//// "typeRoots": [
//// "./types"
//// ]
//// }
//// }
// "typeRoots" does not affect module resolution. Importing from "random" would be a compile error.
verify.importFixAtPosition([
`import { foo } from "../types/random";
foo();`
]);