Delay the calculation of common source root if it would be needed when calculation dts files (#59070)

This commit is contained in:
Sheetal Nandi
2024-06-28 14:29:11 -07:00
committed by GitHub
parent 22bbe867fd
commit 6c68fdd4b5
8 changed files with 703 additions and 31 deletions
+2 -1
View File
@@ -4418,7 +4418,8 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
options.outDir || // there is --outDir specified
options.rootDir || // there is --rootDir specified
options.sourceRoot || // there is --sourceRoot specified
options.mapRoot // there is --mapRoot specified
options.mapRoot || // there is --mapRoot specified
(getEmitDeclarations(options) && options.declarationDir) // there is --declarationDir specified
) {
// Precalculate and cache the common source directory
const dir = getCommonSourceDirectory();