RoadmapShopEvents
Skip to main content

Home > @microsoft/api-extractor

api-extractor package

API Extractor helps with validation, documentation, and reviewing of the exported API for a TypeScript library. The @microsoft/api-extractor package provides the command-line tool. It also exposes a developer API that you can use to invoke API Extractor programmatically.

Classes

ClassDescription
CompilerStateThis class represents the TypeScript compiler state. This allows an optimization where multiple invocations of API Extractor can reuse the same TypeScript compiler analysis.
ExtractorThe starting point for invoking the API Extractor tool.
ExtractorConfigThe ExtractorConfig class loads, validates, interprets, and represents the api-extractor.json config file.
ExtractorMessageThis object is used to report an error or warning that occurred during API Extractor's analysis.
ExtractorResultThis object represents the outcome of an invocation of API Extractor.

Enumerations

EnumerationDescription
ConsoleMessageIdUnique identifiers for console messages reported by API Extractor.
ExtractorLogLevelUsed with IConfigMessageReportingRule.logLevel and IExtractorInvokeOptions.messageCallback .
ExtractorMessageCategorySpecifies a category of messages for use with ExtractorMessage .
ExtractorMessageIdUnique identifiers for messages reported by API Extractor during its analysis.

Interfaces

InterfaceDescription
ICompilerStateCreateOptionsOptions for CompilerState.create()
IConfigApiReportConfigures how the API report files (*.api.md) will be generated.
IConfigCompilerDetermines how the TypeScript compiler engine will be invoked by API Extractor.
IConfigDocModelConfigures how the doc model file (*.api.json) will be generated.
IConfigDtsRollupConfigures how the .d.ts rollup file will be generated.
IConfigFileConfiguration options for the API Extractor tool. These options can be constructed programmatically or loaded from the api-extractor.json config file using the ExtractorConfig class.
IConfigMessageReportingRuleConfigures reporting for a given message identifier.
IConfigMessageReportingTableSpecifies a table of reporting rules for different message identifiers, and also the default rule used for identifiers that do not appear in the table.
IConfigTsdocMetadataConfigures how the tsdoc-metadata.json file will be generated.
IExtractorConfigLoadForFolderOptionsOptions for ExtractorConfig.tryLoadForFolder() .
IExtractorConfigPrepareOptionsOptions for ExtractorConfig.prepare() .
IExtractorInvokeOptionsRuntime options for Extractor.
IExtractorMessagePropertiesUsed by ExtractorMessage.properties .
IExtractorMessagesConfigConfigures how API Extractor reports error and warning messages produced during analysis.