* Runs the API Extractor. * Exits with status code 1 if API Extractor reports any warnings or errors. * @param config {ExtractorConfig}
(config)
| 42 | * @param config {ExtractorConfig} |
| 43 | */ |
| 44 | function checkNoErrorsAndWarnings(config) { |
| 45 | const result = Extractor.invoke(config, { |
| 46 | localBuild: false, // validate report, fail on warnings or errors, |
| 47 | }); |
| 48 | |
| 49 | if (!result.succeeded) { |
| 50 | exit( |
| 51 | `API Extractor completed with ${result.errorCount} errors and`, |
| 52 | `${result.warningCount} warnings.`, |
| 53 | ); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Checks the line endings of the API extractor report. |