Skip to content

VariableDecl

VariableDecl defines a variable declaration which may optionally have a constant value.

new VariableDecl(nameValue, varTypeValue, valueValue?, docValue?): VariableDecl

Constructor accepts the variable name, type, optional constant value, and optional usage documentation.

string

Type

Val

string = ""

VariableDecl

declarationIsEquivalent(other): boolean

DeclarationIsEquivalent returns true if one variable declaration has the same name and same type as the input.

VariableDecl

boolean


description(): string

Description returns the usage documentation for the variable, if set.

Good usage instructions provide information about the valid formats, ranges, sizes for the variable type.

string


documentation(): Doc

Documentation returns name, type, and description for the variable.

Doc


name(): string

Name returns the fully-qualified variable name

string


type(): Type

Type returns the types.Type value associated with the variable.

Type


value(): Val | undefined

Value returns the constant value associated with the declaration.

Val | undefined