@@ -320,8 +320,8 @@ namespace ts {
320
320
watchConfigFileWildCardDirectories ( ) ;
321
321
322
322
return configFileName ?
323
- { getCurrentProgram : getCurrentBuilderProgram , getProgram : synchronizeProgram , close } :
324
- { getCurrentProgram : getCurrentBuilderProgram , getProgram : synchronizeProgram , updateRootFileNames, close } ;
323
+ { getCurrentProgram : getCurrentBuilderProgram , getProgram : updateProgram , close } :
324
+ { getCurrentProgram : getCurrentBuilderProgram , getProgram : updateProgram , updateRootFileNames, close } ;
325
325
326
326
function close ( ) {
327
327
resolutionCache . clear ( ) ;
@@ -553,7 +553,7 @@ namespace ts {
553
553
host . clearTimeout ( timerToUpdateProgram ) ;
554
554
}
555
555
writeLog ( "Scheduling update" ) ;
556
- timerToUpdateProgram = host . setTimeout ( updateProgram , 250 ) ;
556
+ timerToUpdateProgram = host . setTimeout ( updateProgramWithWatchStatus , 250 ) ;
557
557
}
558
558
559
559
function scheduleProgramReload ( ) {
@@ -562,10 +562,13 @@ namespace ts {
562
562
scheduleProgramUpdate ( ) ;
563
563
}
564
564
565
- function updateProgram ( ) {
565
+ function updateProgramWithWatchStatus ( ) {
566
566
timerToUpdateProgram = undefined ;
567
567
reportWatchDiagnostic ( Diagnostics . File_change_detected_Starting_incremental_compilation ) ;
568
+ updateProgram ( ) ;
569
+ }
568
570
571
+ function updateProgram ( ) {
569
572
switch ( reloadLevel ) {
570
573
case ConfigFileProgramReloadLevel . Partial :
571
574
perfLogger . logStartUpdateProgram ( "PartialConfigReload" ) ;
@@ -581,6 +584,7 @@ namespace ts {
581
584
break ;
582
585
}
583
586
perfLogger . logStopUpdateProgram ( "Done" ) ;
587
+ return getCurrentBuilderProgram ( ) ;
584
588
}
585
589
586
590
function reloadFileNamesFromConfigFile ( ) {
0 commit comments