mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Treat the input file name from referenced project as "ts" rather than file extension it is when determining eliding file for program construction (#58308)
This commit is contained in:
@@ -4106,7 +4106,8 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
|
||||
}
|
||||
|
||||
const isFromNodeModulesSearch = resolution.isExternalLibraryImport;
|
||||
const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension);
|
||||
// If this is js file source of project reference, dont treat it as js file but as d.ts
|
||||
const isJsFile = !resolutionExtensionIsTSOrJson(resolution.extension) && !getProjectReferenceRedirectProject(resolution.resolvedFileName);
|
||||
const isJsFileFromNodeModules = isFromNodeModulesSearch && isJsFile && (!resolution.originalPath || pathContainsNodeModules(resolution.resolvedFileName));
|
||||
const resolvedFileName = resolution.resolvedFileName;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user