Rush StackShopBlogEvents
Skip to main content

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

ApiTypeAlias class

Represents a TypeScript type alias declaration.

Signature:

export declare class ApiTypeAlias extends ApiTypeAlias_base 

Extends: ApiTypeAlias_base

Remarks

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>;

Constructors

Constructor

Modifiers

Description

(constructor)(options)

Constructs a new instance of the ApiTypeAlias class

Properties

Property

Modifiers

Type

Description

containerKey

readonly

string

kind

readonly

ApiItemKind

typeExcerpt

readonly

Excerpt

An Excerpt that describes the type of the alias.

Methods

Method

Modifiers

Description

buildCanonicalReference()

(BETA)

getContainerKey(name)

static

onDeserializeInto(options, context, jsonObject)

static

serializeInto(jsonObject)