-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(59649): ts Move to a new file doesn't respect importModuleSpecifi…
…er setting (#59670)
- Loading branch information
1 parent
d1e25f2
commit 3abe069
Showing
3 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
// @Filename: /tsconfig.json | ||
//// { | ||
//// "compilerOptions": { | ||
//// "moduleResolution": "Bundler", | ||
//// "baseUrl": "." | ||
//// "paths": { | ||
//// "@foo/*": ["src/*"] | ||
//// } | ||
//// } | ||
//// } | ||
|
||
// @Filename: /src/a.ts | ||
////export function a() { | ||
//// b(); | ||
////} | ||
////[|export function b() { | ||
////}|] | ||
|
||
verify.moveToNewFile({ | ||
newFileContents: { | ||
"/src/a.ts": | ||
`import { b } from "@foo/b"; | ||
export function a() { | ||
b(); | ||
} | ||
`, | ||
"/src/b.ts": | ||
`export function b() { | ||
} | ||
`, | ||
}, | ||
preferences: { | ||
importModuleSpecifierPreference: "non-relative", | ||
} | ||
}); |