@@ -253,7 +253,6 @@ export class AotCompilation extends TypeScriptCompilation {
253253 angularCompiler ,
254254 usingBuildInfo ,
255255 this . #state?. typeScriptProgram ,
256- hostOptions . modifiedFiles ,
257256 filesWithoutDtsSignature ,
258257 ) ,
259258 )
@@ -588,7 +587,6 @@ function findAffectedFiles(
588587 { ignoreForDiagnostics, incrementalCompilation } : ng . NgtscProgram [ 'compiler' ] ,
589588 includeTTC : boolean ,
590589 oldBuilder : ts . EmitAndSemanticDiagnosticsBuilderProgram | undefined ,
591- modifiedFiles : ReadonlySet < string > | undefined ,
592590 filesWithoutDtsSignature : Set < string > ,
593591) : Set < ts . SourceFile > {
594592 const affectedFiles = new Set < ts . SourceFile > ( ) ;
@@ -620,9 +618,7 @@ function findAffectedFiles(
620618 }
621619
622620 if ( oldProgram && filesWithoutDtsSignature . has ( targetSourceFile . fileName ) ) {
623- const oldSourceFile = ! modifiedFiles ?. has ( targetSourceFile . fileName )
624- ? oldProgram . getSourceFile ( targetSourceFile . fileName )
625- : undefined ;
621+ const oldSourceFile = oldProgram . getSourceFile ( targetSourceFile . fileName ) ;
626622 if ( oldSourceFile ) {
627623 let oldDtsText : string | undefined ;
628624 let oldHasDiagnostics = false ;
@@ -761,12 +757,8 @@ function populatePreviousDtsSignatures(
761757) : void {
762758 const filesToUpdate : ts . SourceFile [ ] = [ ] ;
763759 for ( const modifiedFile of modifiedFiles ) {
764- if ( ! filesWithoutDtsSignature . delete ( modifiedFile ) ) {
765- continue ;
766- }
767-
768760 const sf = oldProgram . getSourceFile ( modifiedFile ) ;
769- if ( sf && ! sf . isDeclarationFile ) {
761+ if ( sf && ! sf . isDeclarationFile && filesWithoutDtsSignature . delete ( sf . fileName ) ) {
770762 filesToUpdate . push ( sf ) ;
771763 }
772764 }
0 commit comments