MCPcopy Create free account
hub / github.com/angular/dev-infra / processExtractorMessage

Function processExtractorMessage

bazel/api-golden/test_api_report.ts:159–170  ·  view source on GitHub ↗

* Process an API extractor message. Microsoft's API extractor allows developers to * handle messages before API extractor prints them. This allows us to adjust log level * for certain messages, or to fully prevent messages from being printed out. *

(message: ExtractorMessage)

Source from the content-addressed store, hash-verified

157 * for certain messages, or to fully prevent messages from being printed out.
158 * */
159async function processExtractorMessage(message: ExtractorMessage) {
160 // If the golden does not match, we hide the error as API extractor prints
161 // a warning asking the user to manually copy the new API report. We print
162 // a custom warning below asking the developer to run the `.accept` Bazel target.
163 // TODO: Simplify once https://github.com/microsoft/rushstack/issues/2773 is resolved.
164 if (message.messageId === ConsoleMessageId.ApiReportNotCopied) {
165 // Mark the message as handled so that API-extractor does not print it. We print
166 // a message manually after extraction.
167 message.handled = true;
168 message.logLevel = ExtractorLogLevel.None;
169 }
170}
171
172export default function (args: Parameters<typeof testApiGolden>) {
173 return testApiGolden(...args);

Callers 1

testApiGoldenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected