b94061c587
* 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
24 lines
487 B
TypeScript
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();`
|
|
]);
|