@microsoft/api-extractor-model
A helper library for loading and saving the .api.json files created by API Extractor
Last updated 6 months ago by odspnpm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @microsoft/api-extractor-model 
SYNC missed versions from official npm registry.

@microsoft/api-extractor-model

Use this library to read and write *.api.json files as defined by the API Extractor tool. These files are used to generate a documentation website for your TypeScript package. The files store the API signatures and doc comments that were extracted from your package.

API documentation for this package: https://api.rushstack.io/pages/api-extractor-model/

Example Usage

The following code sample shows how to load example.api.json, which would be generated by API Extractor when it analyzes a hypothetical NPM package called example:

import { ApiModel, ApiPackage } from '@microsoft/api-extractor-model';

const apiModel: ApiModel = new ApiModel();
const apiPackage: ApiPackage = apiModel.loadPackage('example.api.json');

for (const member of apiPackage.members) {
  console.log(member.displayName);
}

The ApiModel is acts as a container for various packages that are loaded and operated on as a group. For example, a documentation tool may need to resolve @link references across different packages. In this case we would load the various packages into the ApiModel, and then use the ApiModel.resolveDeclarationReference() to resolve the @link targets.

The data structure forms a tree of various classes that start with the Api prefix. The nesting hierarchy might look like this:

- ApiModel
  - ApiPackage
    - ApiEntryPoint
      - ApiClass
        - ApiMethod
        - ApiProperty
      - ApiEnum
        - ApiEnumMember
      - ApiInterface
        - ApiMethodSignature
        - ApiPropertySignature
      - ApiNamespace
        - (ApiClass, ApiEnum, ApiInterface, ...)

You can use the ApiItem.members property to traverse this tree.

Note that the non-abstract classes (e.g. ApiClass, ApiEnum, ApiInterface, etc.) use TypeScript "mixin" functions (e.g. ApiDeclaredItem, ApiItemContainerMixin, etc.) to add various features that cannot be represented as a normal inheritance chain (since TypeScript does not allow a child class to extend more than one base class). The "mixin" is a TypeScript merged declaration with three components: the function that generates a subclass, an interface that describes the members of the subclass, and a namespace containing static members of the class.

For a complete project that uses these APIs to generate an API reference web site, see the @microsoft/api-documenter source code.

Links

API Extractor is part of the Rush Stack family of projects.

Current Tags

  • 7.29.8                                ...           latest (2 months ago)

194 Versions

  • 7.29.8                                ...           2 months ago
  • 7.29.7                                ...           2 months ago
  • 7.29.6                                ...           3 months ago
  • 7.29.5                                ...           3 months ago
  • 7.29.4                                ...           4 months ago
  • 7.29.3                                ...           4 months ago
  • 7.29.2                                ...           6 months ago
  • 7.29.1                                ...           6 months ago
  • 7.29.0                                ...           6 months ago
  • 7.28.21                                ...           6 months ago
  • 7.28.20                                ...           6 months ago
  • 7.28.19                                ...           6 months ago
  • 7.28.18                                ...           6 months ago
  • 7.28.17                                ...           6 months ago
  • 7.28.16                                ...           6 months ago
  • 7.28.15                                ...           6 months ago
  • 7.28.14                                ...           7 months ago
  • 7.28.13                                ...           9 months ago
  • 7.28.12                                ...           9 months ago
  • 7.28.11                                ...           9 months ago
  • 7.28.10                                ...           9 months ago
  • 7.28.9                                ...           9 months ago
  • 7.28.8                                ...           9 months ago
  • 7.28.7                                ...           10 months ago
  • 7.28.6                                ...           10 months ago
  • 7.28.5                                ...           10 months ago
  • 7.28.4                                ...           10 months ago
  • 7.28.3                                ...           a year ago
  • 7.28.2                                ...           a year ago
  • 7.28.1                                ...           a year ago
  • 7.28.0                                ...           a year ago
  • 7.27.6                                ...           a year ago
  • 7.27.5                                ...           a year ago
  • 7.27.4                                ...           a year ago
  • 7.27.3                                ...           a year ago
  • 7.27.2                                ...           a year ago
  • 7.27.1                                ...           a year ago
  • 7.27.0                                ...           a year ago
  • 7.26.9                                ...           2 years ago
  • 7.26.8                                ...           2 years ago
  • 7.26.7                                ...           2 years ago
  • 7.26.6                                ...           2 years ago
  • 7.26.5                                ...           2 years ago
  • 7.26.4                                ...           2 years ago
  • 7.26.3                                ...           2 years ago
  • 7.26.2                                ...           2 years ago
  • 7.26.1                                ...           2 years ago
  • 7.26.0                                ...           2 years ago
  • 7.25.3                                ...           2 years ago
  • 7.25.2                                ...           2 years ago
  • 7.25.1                                ...           2 years ago
  • 7.25.0                                ...           2 years ago
  • 7.24.4                                ...           2 years ago
  • 7.24.3                                ...           2 years ago
  • 7.24.2                                ...           2 years ago
  • 7.24.1                                ...           2 years ago
  • 7.24.0                                ...           2 years ago
  • 7.23.3                                ...           2 years ago
  • 7.23.2                                ...           2 years ago
  • 7.23.1                                ...           2 years ago
  • 7.23.0                                ...           2 years ago
  • 7.22.2                                ...           2 years ago
  • 7.22.1                                ...           2 years ago
  • 7.22.0                                ...           2 years ago
  • 7.21.0                                ...           2 years ago
  • 7.20.3                                ...           2 years ago
  • 7.20.2                                ...           2 years ago
  • 7.20.1                                ...           2 years ago
  • 7.20.0                                ...           2 years ago
  • 7.19.1                                ...           2 years ago
  • 7.19.0                                ...           2 years ago
  • 7.18.2                                ...           2 years ago
  • 7.18.1                                ...           2 years ago
  • 7.18.0                                ...           2 years ago
  • 7.17.3                                ...           3 years ago
  • 7.17.2                                ...           3 years ago
  • 7.17.1                                ...           3 years ago
  • 7.17.0                                ...           3 years ago
  • 7.16.2                                ...           3 years ago
  • 7.16.1                                ...           3 years ago
  • 7.16.0                                ...           3 years ago
  • 7.15.4                                ...           3 years ago
  • 7.15.3                                ...           3 years ago
  • 7.15.2                                ...           3 years ago
  • 7.15.1                                ...           3 years ago
  • 7.15.0                                ...           3 years ago
  • 7.14.0                                ...           3 years ago
  • 7.13.18                                ...           3 years ago
  • 7.13.17                                ...           3 years ago
  • 7.13.16                                ...           3 years ago
  • 7.13.15                                ...           3 years ago
  • 7.13.14                                ...           3 years ago
  • 7.13.13                                ...           3 years ago
  • 7.13.12                                ...           3 years ago
  • 7.13.11                                ...           3 years ago
  • 7.13.10                                ...           3 years ago
  • 7.13.9                                ...           3 years ago
  • 7.13.8                                ...           3 years ago
  • 7.13.7                                ...           3 years ago
  • 7.13.6                                ...           3 years ago
  • 7.13.5                                ...           3 years ago
  • 7.13.4                                ...           3 years ago
  • 7.13.3                                ...           3 years ago
  • 7.13.2                                ...           3 years ago
  • 7.13.1                                ...           4 years ago
  • 7.13.0                                ...           4 years ago
  • 7.12.5                                ...           4 years ago
  • 7.12.4                                ...           4 years ago
  • 7.12.3                                ...           4 years ago
  • 7.12.2                                ...           4 years ago
  • 7.12.1                                ...           4 years ago
  • 7.12.0                                ...           4 years ago
  • 7.11.0                                ...           4 years ago
  • 7.10.10                                ...           4 years ago
  • 7.10.9                                ...           4 years ago
  • 7.10.8                                ...           4 years ago
  • 7.10.7                                ...           4 years ago
  • 7.10.6                                ...           4 years ago
  • 7.10.5                                ...           4 years ago
  • 7.10.4                                ...           4 years ago
  • 7.10.3                                ...           4 years ago
  • 7.10.2                                ...           4 years ago
  • 7.10.1                                ...           4 years ago
  • 7.10.0                                ...           4 years ago
  • 7.9.7                                ...           4 years ago
  • 7.9.6                                ...           4 years ago
  • 7.9.5                                ...           4 years ago
  • 7.9.4                                ...           4 years ago
  • 7.9.3                                ...           4 years ago
  • 7.9.2                                ...           4 years ago
  • 7.9.1                                ...           4 years ago
  • 7.9.0                                ...           4 years ago
  • 7.8.22                                ...           4 years ago
  • 7.8.21                                ...           4 years ago
  • 7.8.20                                ...           4 years ago
  • 7.8.19                                ...           4 years ago
  • 7.8.18                                ...           4 years ago
  • 7.8.17                                ...           4 years ago
  • 7.8.16                                ...           4 years ago
  • 7.8.15                                ...           4 years ago
  • 7.8.14                                ...           4 years ago
  • 7.8.13                                ...           4 years ago
  • 7.8.12                                ...           4 years ago
  • 7.8.11                                ...           4 years ago
  • 7.8.10                                ...           4 years ago
  • 7.8.9                                ...           4 years ago
  • 7.8.8                                ...           4 years ago
  • 7.8.7                                ...           4 years ago
  • 7.8.6                                ...           4 years ago
  • 7.8.5                                ...           4 years ago
  • 7.8.4                                ...           4 years ago
  • 7.8.3                                ...           4 years ago
  • 7.8.2                                ...           4 years ago
  • 7.8.1                                ...           4 years ago
  • 7.8.0                                ...           5 years ago
  • 7.7.11                                ...           5 years ago
  • 7.7.10                                ...           5 years ago
  • 7.7.9                                ...           5 years ago
  • 7.7.8                                ...           5 years ago
  • 7.7.7                                ...           5 years ago
  • 7.7.6                                ...           5 years ago
  • 7.7.5                                ...           5 years ago
  • 7.7.4                                ...           5 years ago
  • 7.7.3                                ...           5 years ago
  • 7.7.2                                ...           5 years ago
  • 7.7.1                                ...           5 years ago
  • 7.7.0                                ...           5 years ago
  • 7.6.0                                ...           5 years ago
  • 7.5.6                                ...           5 years ago
  • 7.5.5                                ...           5 years ago
  • 7.5.4                                ...           5 years ago
  • 7.5.3                                ...           5 years ago
  • 7.5.2                                ...           5 years ago
  • 7.5.1                                ...           5 years ago
  • 7.5.0                                ...           5 years ago
  • 7.4.2                                ...           5 years ago
  • 7.4.1                                ...           5 years ago
  • 7.4.0                                ...           5 years ago
  • 7.3.4                                ...           5 years ago
  • 7.3.3                                ...           5 years ago
  • 7.3.2                                ...           5 years ago
  • 7.3.1                                ...           5 years ago
  • 7.3.0                                ...           5 years ago
  • 7.2.0                                ...           5 years ago
  • 7.1.3                                ...           5 years ago
  • 7.1.2                                ...           5 years ago
  • 7.1.1                                ...           5 years ago
  • 7.1.0                                ...           6 years ago
  • 7.0.28                                ...           6 years ago
  • 7.0.27                                ...           6 years ago
  • 7.0.26                                ...           6 years ago
  • 7.0.25                                ...           6 years ago
  • 7.0.24                                ...           6 years ago
  • 0.0.0                                ...           6 years ago
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (5)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE