Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/api-extractor > ExtractorMessage

ExtractorMessage class

This object is used to report an error or warning that occurred during API Extractor's analysis.

Signature:

export declare class ExtractorMessage 

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the ExtractorMessage class.

Properties

PropertyModifiersTypeDescription
categoryreadonlyExtractorMessageCategoryThe category of issue.
handledbooleanIf the IExtractorInvokeOptions.messageCallback sets this property to true, it will prevent the message from being displayed by API Extractor.
logLevelExtractorLogLevelSpecifies how the message should be reported.
messageIdreadonlytsdoc.TSDocMessageId | ExtractorMessageId | ConsoleMessageId | stringA text string that uniquely identifies the issue type. This identifier can be used to suppress or configure the reporting of issues, and also to search for help about an issue.
propertiesreadonlyIExtractorMessagePropertiesAdditional contextual information about the message that may be useful when reporting errors. All properties are optional.
sourceFileColumnreadonlynumber | undefinedThe column number where the issue occurred in the input source file. This is not used if sourceFilePath is undefined. The first column number is 1.
sourceFileLinereadonlynumber | undefinedThe line number where the issue occurred in the input source file. This is not used if sourceFilePath is undefined. The first line number is 1.
sourceFilePathreadonlystring | undefinedThe absolute path to the affected input source file, if there is one.
textreadonlystringThe text description of this issue.

Methods

MethodModifiersDescription
formatMessageWithLocation(workingPackageFolderPath)Returns the message formatted with its identifier and file position.
formatMessageWithoutLocation()