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
Constructor | Modifiers | Description |
---|---|---|
(constructor)(options) | Constructs a new instance of the ApiVariable class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
containerKey | readonly | string | |
kind | readonly | ApiItemKind | |
variableTypeExcerpt | readonly | Excerpt | An Excerpt that describes the type of the variable. |
Methods
Method | Modifiers | Description |
---|---|---|
buildCanonicalReference() | (BETA) | |
getContainerKey(name) | static | |
onDeserializeInto(options, context, jsonObject) | static | |
serializeInto(jsonObject) |