Skip to content

Variable

Variable represents a typed variable declaration which will be published via the cel.VariableDecls() option.

new Variable(name, typeDesc?): Variable

Constructor returns a serializable variable from a name and type definition.

string

TypeDesc

Variable

description: string = ""


name: string


optional type?: TypeDesc


optional typeDesc?: TypeDesc

asCELVariable(tp): VariableDecl

AsCELVariable converts the serializable form of the Variable into a CEL environment declaration.

Provider

VariableDecl


getType(): TypeDesc | undefined

GetType returns the variable type description.

TypeDesc | undefined


validate(): Error | undefined

Validate validates the variable configuration is well-formed.

Error | undefined