From 97cfa26f2ac4991183347c6f07959f4571dd5eb0 Mon Sep 17 00:00:00 2001 From: VincentBailly Date: Mon, 9 Jun 2025 20:48:30 +0200 Subject: [PATCH] optimization, reduce memory usage (#61822) --- src/compiler/program.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index abb937d0271..445946dab0c 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -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;