Rush StackShopBlogEvents
Skip to main content

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

ApiConstructor class

Represents a TypeScript class constructor declaration that belongs to an ApiClass.

Signature:

export declare class ApiConstructor extends ApiConstructor_base 

Extends: ApiConstructor_base

Remarks

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

ApiConstructor represents a declaration using the constructor keyword such as in this example:

export class Vector {
public x: number;
public y: number;

// A class constructor:
public constructor(x: number, y: number) {
this.x = x;
this.y = y;
}
}

Compare with ApiConstructSignature, which describes the construct signature for a class constructor.

Constructors

ConstructorModifiersDescription
(constructor)(options)Constructs a new instance of the ApiConstructor class

Properties

PropertyModifiersTypeDescription
containerKeyreadonlystring
kindreadonlyApiItemKind

Methods

MethodModifiersDescription
buildCanonicalReference()(BETA)
getContainerKey(overloadIndex)static