@@ -94,6 +94,11 @@ export class ExtractorResult {
9494 */
9595 public readonly succeeded : boolean ;
9696
97+ /**
98+ * Returns true if the API report was found to have changed.
99+ */
100+ public readonly apiReportChanged : boolean ;
101+
97102 /**
98103 * Reports the number of errors encountered during analysis.
99104 *
@@ -115,6 +120,7 @@ export class ExtractorResult {
115120 this . compilerState = properties . compilerState ;
116121 this . extractorConfig = properties . extractorConfig ;
117122 this . succeeded = properties . succeeded ;
123+ this . apiReportChanged = properties . apiReportChanged ;
118124 this . errorCount = properties . errorCount ;
119125 this . warningCount = properties . warningCount ;
120126 }
@@ -199,6 +205,8 @@ export class Extractor {
199205 } ) ;
200206 }
201207
208+ let apiReportChanged : boolean = false ;
209+
202210 if ( extractorConfig . apiReportEnabled ) {
203211 const actualApiReportPath : string = extractorConfig . reportTempFilePath ;
204212 const actualApiReviewShortPath : string = extractorConfig . _getShortFilePath ( extractorConfig . reportTempFilePath ) ;
@@ -239,6 +247,8 @@ export class Extractor {
239247 convertLineEndings : NewlineKind . CrLf
240248 } ) ;
241249 }
250+
251+ apiReportChanged = true ;
242252 } else {
243253 messageRouter . logVerbose ( ConsoleMessageId . ApiReportUnchanged ,
244254 `The API signature is up to date: ${ actualApiReviewShortPath } ` ) ;
@@ -281,6 +291,7 @@ export class Extractor {
281291 compilerState,
282292 extractorConfig,
283293 succeeded,
294+ apiReportChanged,
284295 errorCount : messageRouter . errorCount ,
285296 warningCount : messageRouter . warningCount
286297 } ) ;
0 commit comments