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

View File

@@ -1699,7 +1699,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
!sourceFile ||
sourceFile.resolvedPath !== source ||
!this.isValidGeneratedFileWatcher(
getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.currentDirectory, this.program!.getCommonSourceDirectory(), this.getCanonicalFileName),
getDeclarationEmitOutputFilePathWorker(sourceFile.fileName, this.compilerOptions, this.program!),
watcher,
)
) {