Rush StackShopBlogEvents
Skip to main content

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

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

Properties

PropertyModifiersTypeDescription
containerKeyreadonlystring
kindreadonlyApiItemKind

Methods

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