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

ApiTypeAlias class

Represents a TypeScript type alias declaration.


export declare class ApiTypeAlias extends ApiTypeAlias_base 

Extends: ApiTypeAlias_base


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

ApiTypeAlias represents a definition such as one of these examples:

// A union type:
export type Shape = Square | Triangle | Circle;

// A generic type alias:
export type BoxedValue<T> = { value: T };

export type BoxedArray<T> = { array: T[] };

// A conditional type alias:
export type Boxed<T> = T extends any[] ? BoxedArray<T[number]> : BoxedValue<T>;


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


Property Modifiers Type Description
containerKey   string  
kind   ApiItemKind  
typeExcerpt   Excerpt An Excerpt that describes the type of the alias.


Method Modifiers Description
buildCanonicalReference()   (BETA)
getContainerKey(name) static  
onDeserializeInto(options, context, jsonObject) static