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

ApiEnum class

Represents a TypeScript enum declaration.

Signature:

export declare class ApiEnum extends ApiEnum_base 

Remarks

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

ApiEnum represents an enum declaration such as FontSizes in the example below:

export enum FontSizes {
  Small = 100,
  Medium = 200,
  Large = 300
}

Constructors

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

Properties

Property Modifiers Type Description
containerKey   string  
kind   ApiItemKind  
members   ReadonlyArray<ApiEnumMember>  

Methods

Method Modifiers Description
addMember(member)    
buildCanonicalReference()   (BETA)
getContainerKey(name) static