Variable
Variable represents a typed variable declaration which will be published via the cel.VariableDecls() option.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Variable(
name,typeDesc?):Variable
Constructor returns a serializable variable from a name and type definition.
Parameters
Section titled “Parameters”string
typeDesc?
Section titled “typeDesc?”Returns
Section titled “Returns”Variable
Properties
Section titled “Properties”description
Section titled “description”description:
string=""
name:
string
optionaltype?:TypeDesc
typeDesc?
Section titled “typeDesc?”
optionaltypeDesc?:TypeDesc
Methods
Section titled “Methods”asCELVariable()
Section titled “asCELVariable()”asCELVariable(
tp):VariableDecl
AsCELVariable converts the serializable form of the Variable into a CEL environment declaration.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”getType()
Section titled “getType()”getType():
TypeDesc|undefined
GetType returns the variable type description.
Returns
Section titled “Returns”TypeDesc | undefined
validate()
Section titled “validate()”validate():
Error|undefined
Validate validates the variable configuration is well-formed.
Returns
Section titled “Returns”Error | undefined