Gathering detailed insights and metrics for @microsoft/api-extractor-model
Gathering detailed insights and metrics for @microsoft/api-extractor-model
Gathering detailed insights and metrics for @microsoft/api-extractor-model
Gathering detailed insights and metrics for @microsoft/api-extractor-model
Monorepo for tools developed by the Rush Stack community
npm install @microsoft/api-extractor-model
Typescript
Module System
Node Version
NPM Version
TypeScript (95.75%)
JavaScript (3.94%)
SCSS (0.15%)
Shell (0.05%)
HTML (0.04%)
CSS (0.03%)
Sass (0.03%)
Batchfile (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
6,227 Stars
22,499 Commits
636 Forks
53 Watchers
103 Branches
286 Contributors
Updated on Jul 13, 2025
Latest Version
7.30.6
Package Id
@microsoft/api-extractor-model@7.30.6
Unpacked Size
864.58 kB
Size
148.95 kB
File Count
203
NPM Version
10.8.2
Node Version
20.19.0
Published on
May 01, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
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/
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
:
1import { ApiModel, ApiPackage } from '@microsoft/api-extractor-model'; 2 3const apiModel: ApiModel = new ApiModel(); 4const apiPackage: ApiPackage = apiModel.loadPackage('example.api.json'); 5 6for (const member of apiPackage.members) { 7 console.log(member.displayName); 8}
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.
API Extractor is part of the Rush Stack family of projects.
No vulnerabilities found.
Reason
30 commit(s) and 10 issue activity found in the last 90 days -- score normalized to 10
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 13/30 approved changesets -- score normalized to 4
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
37 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More