cel-ts - v0.1.0-alpha
    Preparing search index...

      cel-ts - v0.1.0-alpha

      cel-ts: Common Expression Language (CEL) implementation in TypeScript

      CEL is an expression language developed by Google, used for configuration files and policy definitions. This library is implemented in TypeScript based on the cel-go design.

      import { Env, Variable, IntType } from "cel-ts";

      // Create an environment
      const env = new Env({
      variables: [new Variable("x", IntType)],
      });

      // Compile an expression
      const ast = env.compile("x + 1");

      // Create and run a program
      const program = env.program(ast);
      const result = program.eval({ x: 10n });
      console.log(result.value()); // 11n

      Classes

      Ast
      BindingsExtension
      BoolValue
      BytesValue
      CheckerError
      Constant
      DoubleValue
      DurationValue
      EmptyActivation
      EncodersExtension
      EnumValue
      Env
      ErrorValue
      Formatter
      Function
      GlobalMacro
      GlobalVarArgMacro
      Helper
      HierarchicalActivation
      InterpreterError
      IntValue
      LazyActivation
      Linter
      ListsExtension
      ListType
      ListValue
      MacroError
      MacroRegistry
      MapActivation
      MapType
      MapValue
      MathExtension
      MemberOverload
      MutableActivation
      NullValue
      OptionalType
      OptionalTypesExtension
      Overload
      Parser
      ParserError
      PartialActivation
      PlannerError
      Program
      ProtobufTypeProvider
      ProtosExtension
      ReceiverMacro
      ReceiverVarArgMacro
      RegexExtension
      SetsExtension
      StrictActivation
      StringsExtension
      StringValue
      Struct
      StructField
      StructType
      TimestampValue
      TwoVarComprehensionsExtension
      Type
      TypeType
      TypeValue
      UintValue
      Variable

      Interfaces

      EnvOptions
      Extension
      FormatterOptions
      ParserOptions

      Type Aliases

      Activation
      BinaryBinding
      FunctionBinding
      LintContext
      LintDiagnostic
      LintRule
      LintSeverity
      ListsOptions
      Macro
      MacroExpander
      MathOptions
      ProtoType
      ProtoValue
      StringsOptions
      UnaryBinding
      Value

      Variables

      AccumulatorName
      AllMacros
      AnyType
      BoolType
      BytesType
      DoubleType
      DurationType
      DynType
      DynTypeType
      ErrorType
      IntType
      NoMacros
      NullType
      StandardMacros
      StringType
      TimestampType
      UintType
      VERSION

      Functions

      applyExtensions
      isErrorValue
      isUnknownValue
      mergeEnvOptions
      protoFunctionDeclToFunctionDecl
      protoTypeToCelType
      protoValueToCelValue
      stripTypeUrl
      toTypeValue

      References

      Options → EnvOptions