@@ -13,7 +13,7 @@ namespace ts {
13
13
}
14
14
15
15
let reportDiagnostic = createDiagnosticReporter ( sys ) ;
16
- function updateReportDiagnostic ( options ? : CompilerOptions ) {
16
+ function updateReportDiagnostic ( options : CompilerOptions | BuildOptions ) {
17
17
if ( shouldBePretty ( options ) ) {
18
18
reportDiagnostic = createDiagnosticReporter ( sys , /*pretty*/ true ) ;
19
19
}
@@ -23,7 +23,7 @@ namespace ts {
23
23
return ! ! sys . writeOutputIsTTY && sys . writeOutputIsTTY ( ) ;
24
24
}
25
25
26
- function shouldBePretty ( options ? : CompilerOptions ) {
26
+ function shouldBePretty ( options : CompilerOptions | BuildOptions ) {
27
27
if ( ! options || typeof options . pretty === "undefined" ) {
28
28
return defaultIsPretty ( ) ;
29
29
}
@@ -192,7 +192,7 @@ namespace ts {
192
192
}
193
193
194
194
// Update to pretty if host supports it
195
- updateReportDiagnostic ( ) ;
195
+ updateReportDiagnostic ( buildOptions ) ;
196
196
if ( projects . length === 0 ) {
197
197
printVersion ( ) ;
198
198
printHelp ( buildOpts , "--build " ) ;
@@ -209,8 +209,8 @@ namespace ts {
209
209
210
210
// Use default createProgram
211
211
const buildHost = buildOptions . watch ?
212
- createSolutionBuilderWithWatchHost ( sys , /*createProgram*/ undefined , reportDiagnostic , createBuilderStatusReporter ( sys , shouldBePretty ( ) ) , createWatchStatusReporter ( ) ) :
213
- createSolutionBuilderHost ( sys , /*createProgram*/ undefined , reportDiagnostic , createBuilderStatusReporter ( sys , shouldBePretty ( ) ) , createReportErrorSummary ( buildOptions ) ) ;
212
+ createSolutionBuilderWithWatchHost ( sys , /*createProgram*/ undefined , reportDiagnostic , createBuilderStatusReporter ( sys , shouldBePretty ( buildOptions ) ) , createWatchStatusReporter ( buildOptions ) ) :
213
+ createSolutionBuilderHost ( sys , /*createProgram*/ undefined , reportDiagnostic , createBuilderStatusReporter ( sys , shouldBePretty ( buildOptions ) ) , createReportErrorSummary ( buildOptions ) ) ;
214
214
updateCreateProgram ( buildHost ) ;
215
215
buildHost . afterProgramEmitAndDiagnostics = ( program : BuilderProgram ) => reportStatistics ( program . getProgram ( ) ) ;
216
216
@@ -316,7 +316,7 @@ namespace ts {
316
316
} ;
317
317
}
318
318
319
- function createWatchStatusReporter ( options ? : CompilerOptions ) {
319
+ function createWatchStatusReporter ( options : CompilerOptions | BuildOptions ) {
320
320
return ts . createWatchStatusReporter ( sys , shouldBePretty ( options ) ) ;
321
321
}
322
322
0 commit comments