Home > @microsoft/api-extractor > ExtractorConfig
ExtractorConfig class
The ExtractorConfig class loads, validates, interprets, and represents the api-extractor.json config file.
Signature:
/** @sealed */
export declare class ExtractorConfig
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| string | Specifies the output path for a .d.ts rollup file to be generated with trimming for an "alpha" release. | |
| string | The output path for the doc model file. The file extension should be ".api.json". | |
| boolean | Whether to generate an API report. | |
| boolean | Whether "forgotten exports" should be included in the API report file. | |
| string | Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. | |
| string[] | A list of NPM package names whose exports should be treated as part of this package. | |
| IApiModelGenerationOptions | undefined | (BETA) If specified, the doc model is enabled and the specified options will be used. | |
| boolean | Whether "forgotten exports" should be included in the doc model file. | |
| Specifies how API Extractor sorts members of an enum when generating the .api.json file. | ||
| 'api-extractor.json' | The config file name "api-extractor.json". | |
| The JSON Schema for API Extractor config file (api-extractor.schema.json). | ||
| string | Specifies the .d.ts file to be used as the starting point for analysis. API Extractor analyzes the symbols exported by this module. | |
| Configures how API Extractor reports error and warning messages produced during analysis. | ||
| Specifies what type of newlines API Extractor should use when writing output files. By default, the output files will be written with Windows-style newlines. | ||
| boolean | When a declaration is trimmed, by default it will be replaced by a code comment such as "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the declaration completely. | |
| {} | undefined | Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. | |
| string | undefined | The absolute path of the folder containing the package.json file for the working package, or undefined if API Extractor was invoked without a package.json file. | |
| INodePackageJson | undefined | The parsed package.json file for the working package, or undefined if API Extractor was invoked without a package.json file. | |
| string | Determines the | |
| string | undefined | The base URL where the project's source code can be viewed on a website such as GitHub or Azure DevOps. This URL path corresponds to the | |
| string | Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. | |
| readonly IExtractorConfigApiReport[] | List of configurations for report files to be generated. | |
| string | Gets the file path for the "complete" (default) report configuration, if one was specified. Otherwise, returns an empty string. | |
| string | Specifies the folder where the API report file is written. The file name portion is determined by the | |
| string | Gets the temp file path for the "complete" (default) report configuration, if one was specified. Otherwise, returns an empty string. | |
| string | Specifies the folder where the temporary report file is written. The file name portion is determined by the | |
| boolean | Whether to generate the .d.ts rollup file. | |
| boolean | This option causes the compiler to be invoked with the | |
| Readonly<Record<`@${string}`, boolean>> | Specifies a list of TSDoc tags that should be reported in the API report file for items whose documentation contains them. | |
| boolean | Set to true when invoking API Extractor's test harness. | |
| string | Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. | |
| TSDocConfigFile | The tsdoc.json configuration that will be used when parsing doc comments. | |
| TSDocConfiguration | The | |
| boolean | Whether to generate the tsdoc-metadata.json file. | |
| string | Specifies where the TSDoc metadata file should be written. | |
| string | Specifies the output path for a .d.ts rollup file to be generated without any trimming. |
Methods
Method | Modifiers | Description |
|---|---|---|
Returns a JSON-like string representing the | ||
| Returns true if the specified file path has the ".d.ts" file extension. | |
| Performs only the first half of ExtractorConfig.loadFileAndPrepare(), providing an opportunity to modify the object before it is passed to ExtractorConfig.prepare(). | |
| Loads the api-extractor.json config file from the specified file path, and prepares an | |
| Prepares an | |
| Searches for the api-extractor.json config file associated with the specified starting folder, and loads the file if found. This lookup supports rig packages. |