Home > @microsoft/api-extractor-model > ApiEntryPoint

ApiEntryPoint class

Represents the entry point for an NPM package.

Signature:

export declare class ApiEntryPoint extends ApiEntryPoint_base 

Constructors

Constructor Modifiers Description
(constructor)(options)   Constructs a new instance of the ApiEntryPoint class

Properties

Property Modifiers Type Description
containerKey   string  
importPath   string The module path for this entry point, relative to the parent ApiPackage. In the current implementation, this is always the empty string, indicating the default entry point.
kind   ApiItemKind  

Methods

Method Modifiers Description
buildCanonicalReference()   (BETA)

Remarks

This is part of the ApiModel hierarchy of classes, which are serializable representations of API declarations.

ApiEntryPoint represents the entry point to an NPM package. API Extractor does not currently support analysis of multiple entry points, but the ApiEntryPoint object is included to support a future feature. In the current implementation, ApiEntryPoint.importPath is always the empty string.

For example, suppose the package.json file looks like this:

{
  "name": "example-library",
  "version": "1.0.0",
  "main": "./lib/index.js",
  "typings": "./lib/index.d.ts"
}

In this example, the ApiEntryPoint would represent the TypeScript module for ./lib/index.js.