VariableDecl
VariableDecl defines a variable declaration which may optionally have a constant value.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new VariableDecl(
nameValue,varTypeValue,valueValue?,docValue?):VariableDecl
Constructor accepts the variable name, type, optional constant value, and optional usage documentation.
Parameters
Section titled “Parameters”nameValue
Section titled “nameValue”string
varTypeValue
Section titled “varTypeValue”valueValue?
Section titled “valueValue?”docValue?
Section titled “docValue?”string = ""
Returns
Section titled “Returns”VariableDecl
Methods
Section titled “Methods”declarationIsEquivalent()
Section titled “declarationIsEquivalent()”declarationIsEquivalent(
other):boolean
DeclarationIsEquivalent returns true if one variable declaration has the same name and same type as the input.
Parameters
Section titled “Parameters”VariableDecl
Returns
Section titled “Returns”boolean
description()
Section titled “description()”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.
Returns
Section titled “Returns”string
documentation()
Section titled “documentation()”documentation():
Doc
Documentation returns name, type, and description for the variable.
Returns
Section titled “Returns”name()
Section titled “name()”name():
string
Name returns the fully-qualified variable name
Returns
Section titled “Returns”string
type()
Section titled “type()”type():
Type
Type returns the types.Type value associated with the variable.
Returns
Section titled “Returns”value()
Section titled “value()”value():
Val|undefined
Value returns the constant value associated with the declaration.
Returns
Section titled “Returns”Val | undefined