@@ -372,7 +372,8 @@ namespace ts {
372372 errorCount => result . onWatchStatusChange ! (
373373 createCompilerDiagnostic ( getWatchErrorSummaryDiagnosticMessage ( errorCount ) , errorCount ) ,
374374 newLine ,
375- compilerOptions
375+ compilerOptions ,
376+ errorCount
376377 )
377378 ) ;
378379 } ;
@@ -480,14 +481,14 @@ namespace ts {
480481 return createProgram ( rootNames , options , host , oldProgram , configFileParsingDiagnostics , projectReferences ) ;
481482 }
482483
483- export type WatchStatusReporter = ( diagnostic : Diagnostic , newLine : string , options : CompilerOptions ) => void ;
484+ export type WatchStatusReporter = ( diagnostic : Diagnostic , newLine : string , options : CompilerOptions , errorCount ?: number ) => void ;
484485 /** Create the program with rootNames and options, if they are undefined, oldProgram and new configFile diagnostics create new program */
485486 export type CreateProgram < T extends BuilderProgram > = ( rootNames : ReadonlyArray < string > | undefined , options : CompilerOptions | undefined , host ?: CompilerHost , oldProgram ?: T , configFileParsingDiagnostics ?: ReadonlyArray < Diagnostic > , projectReferences ?: ReadonlyArray < ProjectReference > | undefined ) => T ;
486487
487488 /** Host that has watch functionality used in --watch mode */
488489 export interface WatchHost {
489490 /** If provided, called with Diagnostic message that informs about change in watch status */
490- onWatchStatusChange ?( diagnostic : Diagnostic , newLine : string , options : CompilerOptions ) : void ;
491+ onWatchStatusChange ?( diagnostic : Diagnostic , newLine : string , options : CompilerOptions , errorCount ?: number ) : void ;
491492
492493 /** Used to watch changes in source files, missing files needed to update the program or config file */
493494 watchFile ( path : string , callback : FileWatcherCallback , pollingInterval ?: number ) : FileWatcher ;
0 commit comments