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
Property | Modifiers | Type | Description |
---|---|---|---|
category | ExtractorMessageCategory | The category of issue. | |
handled | boolean | If the IExtractorInvokeOptions.messageCallback sets this property to true, it will prevent the message from being displayed by API Extractor. | |
logLevel | ExtractorLogLevel | Specifies how the message should be reported. | |
messageId | tsdoc.TSDocMessageId | ExtractorMessageId | ConsoleMessageId | string | A 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. | |
properties | IExtractorMessageProperties | Additional contextual information about the message that may be useful when reporting errors. All properties are optional. | |
sourceFileColumn | number | undefined | The 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. |
|
sourceFileLine | number | undefined | The 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. |
|
sourceFilePath | string | undefined | The absolute path to the affected input source file, if there is one. | |
text | string | The text description of this issue. |
Methods
Method | Modifiers | Description |
---|---|---|
formatMessageWithLocation(workingPackageFolderPath) | Returns the message formatted with its identifier and file position. | |
formatMessageWithoutLocation() |