Skip to content

EnvOptions

EnvOptions configures a CEL environment using plain TypeScript values.

optional [envInheritance]?: EnvInheritanceOptions

envInheritance carries internal state when extending an existing environment.


optional checker?: CheckerOptions

checker configures type-checking behavior.


optional configuration?: EnvConfigurationOptions

configuration applies a serializable environment configuration and declarative option maps.


optional container?: Container

container controls namespace resolution for identifiers and functions.


optional contextProto?: DescMessage

contextProto declares every field in a protobuf message as a top-level environment variable.


optional cost?: CostOptions

cost configures static checker cost estimation.


optional defaultUTCTimeZone?: boolean

defaultUTCTimeZone controls whether timestamp functions without an explicit timezone use UTC.

When false, timestamp values which retain a native timezone use that location.


optional errorOnBadPresenceTest?: boolean

errorOnBadPresenceTest reports invalid presence traversals instead of treating them as absent.


optional functions?: FunctionDecl[]

functions declares custom function signatures and runtime bindings.


optional jsonFieldNames?: boolean

jsonFieldNames enables protobuf JSON field names during checking, planning, and evaluation.


optional libraries?: Library[]

libraries applies reusable compile and program configuration bundles.


optional macros?: MacroOptions

macros configures standard and custom parser macro availability.


optional maxAstDepth?: number

maxAstDepth records the maximum nesting depth for externally loaded AST configuration.


optional nativeTypes?: NativeObjectDescriptor[]

nativeTypes registers explicit TypeScript object descriptions with the type provider.

A type name already registered with an identical description is left as it is, so a library which declares its own object types may be configured alongside a registry which already describes them.


optional parser?: Partial<ParserOptions>

parser configures syntax features and parser resource limits.


optional regexProgramSizeLimit?: number

regexProgramSizeLimit caps compiled regex instruction counts during validation and evaluation.


optional registry?: Registry

registry supplies protobuf types and adapts native values into CEL values.


optional standardLibrary?: false | StandardLibraryOptions

standardLibrary customizes the standard declarations, or disables them when false.


optional types?: Type[]

types registers CEL runtime types with both the checker and type provider.


optional validators?: ASTValidator[]

validators inspects successfully checked ASTs and reports likely runtime errors.


optional variables?: VariableDecl[]

variables declares the identifiers available while checking expressions.