Home > @microsoft/api-extractor-model > ApiFunction
ApiFunction class
Represents a TypeScript function declaration.
Signature:
export declare class ApiFunction extends ApiFunction_base
Extends: ApiFunction_base
Remarks
This is part of the ApiModel hierarchy of classes, which are serializable representations of API declarations.
ApiFunction represents a TypeScript declaration such as this example:
export function getAverage(x: number, y: number): number {
return (x + y) / 2.0;
}
Functions are exported by an entry point module or by a namespace. Compare with ApiMethod, which represents a function that is a member of a class.
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(options) | Constructs a new instance of the ApiFunction class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| containerKey | readonly | string | |
| kind | readonly | ApiItemKind |
Methods
| Method | Modifiers | Description |
|---|---|---|
| buildCanonicalReference() | (BETA) | |
| getContainerKey(name, overloadIndex) | static |