mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Fix two module specifier ending preference detection issues (#53691)
This commit is contained in:
1 parent
68d8be4f1d
commit
287ee41cf2
4 files changed
+52
-2
No files matched your search
@@ -147,7 +147,9 @@ function getPreferences(
|
||||
return [ModuleSpecifierEnding.JsExtension];
|
||||
}
|
||||
if (getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Classic) {
|
||||
return [ModuleSpecifierEnding.Index, ModuleSpecifierEnding.JsExtension];
|
||||
return preferredEnding === ModuleSpecifierEnding.JsExtension
|
||||
? [ModuleSpecifierEnding.JsExtension, ModuleSpecifierEnding.Index]
|
||||
: [ModuleSpecifierEnding.Index, ModuleSpecifierEnding.JsExtension];
|
||||
}
|
||||
switch (preferredEnding) {
|
||||
case ModuleSpecifierEnding.JsExtension: return [ModuleSpecifierEnding.JsExtension, ModuleSpecifierEnding.Minimal, ModuleSpecifierEnding.Index];
|
||||
|
||||
Reference in new issue
Block a user