Rush StackShopBlogEvents
Skip to main content

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

ApiVariable class

Represents a TypeScript variable declaration.

Signature:

export declare class ApiVariable extends ApiVariable_base 

Extends: ApiVariable_base

Remarks

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

ApiVariable represents an exported const or let object such as these examples:

// A variable declaration
export let verboseLogging: boolean;

// A constant variable declaration with an initializer
export const canvas: IWidget = createCanvas();

Constructors

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

Properties

PropertyModifiersTypeDescription
containerKeyreadonlystring
kindreadonlyApiItemKind
variableTypeExcerptreadonlyExcerptAn Excerpt that describes the type of the variable.

Methods

MethodModifiersDescription
buildCanonicalReference()(BETA)
getContainerKey(name)static
onDeserializeInto(options, context, jsonObject)static
serializeInto(jsonObject)