optimization, reduce memory usage (#61822)

This commit is contained in:
VincentBailly
2025-06-09 11:48:30 -07:00
committed by GitHub
parent 355b9e0984
commit 97cfa26f2a
+2 -2
View File
@@ -4986,8 +4986,8 @@ function updateHostForUseSourceOfProjectReferenceRedirect(host: HostForUseSource
function fileOrDirectoryExistsUsingSource(fileOrDirectory: string, isFile: boolean): boolean {
const fileOrDirectoryExistsUsingSource = isFile ?
(file: string) => fileExistsIfProjectReferenceDts(file) :
(dir: string) => directoryExistsIfProjectReferenceDeclDir(dir);
fileExistsIfProjectReferenceDts :
directoryExistsIfProjectReferenceDeclDir;
// Check current directory or file
const result = fileOrDirectoryExistsUsingSource(fileOrDirectory);
if (result !== undefined) return result;