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
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(options) | Constructs a new instance of the ApiConstructor class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| containerKey | readonly | string | |
| kind | readonly | ApiItemKind |
Methods
| Method | Modifiers | Description |
|---|---|---|
| buildCanonicalReference() | (BETA) | |
| getContainerKey(overloadIndex) | static |