-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🤖 Pick PR #59670 (fix(59649): ts Move to a new file d...) into releas…
…e-5.6 (#59725) Co-authored-by: Oleksandr T. <[email protected]>
- Loading branch information
1 parent
1a03e53
commit 4fe7e41
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", | ||
} | ||
}); |