Rush StackShopBlogEvents
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

Class

Description

CompilerState

This class represents the TypeScript compiler state. This allows an optimization where multiple invocations of API Extractor can reuse the same TypeScript compiler analysis.

Extractor

The starting point for invoking the API Extractor tool.

ExtractorConfig

The ExtractorConfig class loads, validates, interprets, and represents the api-extractor.json config file.

ExtractorMessage

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

ExtractorResult

This object represents the outcome of an invocation of API Extractor.

Enumerations

Enumeration

Description

ConsoleMessageId

Unique identifiers for console messages reported by API Extractor.

ExtractorLogLevel

Used with IConfigMessageReportingRule.logLevel and IExtractorInvokeOptions.messageCallback.

ExtractorMessageCategory

Specifies a category of messages for use with ExtractorMessage.

ExtractorMessageId

Unique identifiers for messages reported by API Extractor during its analysis.

Interfaces

Interface

Description

IApiModelGenerationOptions

(BETA)

ICompilerStateCreateOptions

Options for CompilerState.create()

IConfigApiReport

Configures how the API report files (*.api.md) will be generated.

IConfigCompiler

Determines how the TypeScript compiler engine will be invoked by API Extractor.

IConfigDocModel

Configures how the doc model file (*.api.json) will be generated.

IConfigDtsRollup

Configures how the .d.ts rollup file will be generated.

IConfigFile

Configuration 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.

IConfigMessageReportingRule

Configures reporting for a given message identifier.

IConfigMessageReportingTable

Specifies a table of reporting rules for different message identifiers, and also the default rule used for identifiers that do not appear in the table.

IConfigTsdocMetadata

Configures how the tsdoc-metadata.json file will be generated.

IExtractorConfigApiReport

Configuration for a single API report, including its IExtractorConfigApiReport.variant.

IExtractorConfigLoadForFolderOptions

Options for ExtractorConfig.tryLoadForFolder().

IExtractorConfigPrepareOptions

Options for ExtractorConfig.prepare().

IExtractorInvokeOptions

Runtime options for Extractor.

IExtractorMessageProperties

Used by ExtractorMessage.properties.

IExtractorMessagesConfig

Configures how API Extractor reports error and warning messages produced during analysis.

Type Aliases

Type Alias

Description

ApiReportVariant

The allowed variations of API reports.

ReleaseTagForTrim

The allowed release tags that can be used to mark API items.