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

ApiFunction class

Represents a TypeScript function declaration.


export declare class ApiFunction extends ApiFunction_base 

Extends: ApiFunction_base


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.


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


Property Modifiers Type Description
containerKey   string  
kind   ApiItemKind  


Method Modifiers Description
buildCanonicalReference()   (BETA)
getContainerKey(name, overloadIndex) static