TypeRegistry
TypeRegistry allows third-parties to add custom types to CEL.
Deprecated: use types.Registry
Extends
Section titled “Extends”Methods
Section titled “Methods”enumValue()
Section titled “enumValue()”enumValue(
enumName):Val
EnumValue returns the numeric value of the given enum value name.
Parameters
Section titled “Parameters”enumName
Section titled “enumName”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”findFieldType()
Section titled “findFieldType()”findFieldType(
messageType,fieldName):FieldType|undefined
FindFieldType returns the field type for a checked type value.
Parameters
Section titled “Parameters”messageType
Section titled “messageType”string
fieldName
Section titled “fieldName”string
Returns
Section titled “Returns”FieldType | undefined
Inherited from
Section titled “Inherited from”findIdent()
Section titled “findIdent()”findIdent(
identName):Val|undefined
FindIdent takes a qualified identifier name and returns a Value if one exists.
Parameters
Section titled “Parameters”identName
Section titled “identName”string
Returns
Section titled “Returns”Val | undefined
Inherited from
Section titled “Inherited from”findType()
Section titled “findType()”findType(
typeName):Type|undefined
FindType looks up the Type given a qualified typeName. Returns false if not found.
Parameters
Section titled “Parameters”typeName
Section titled “typeName”string
Returns
Section titled “Returns”Type | undefined
Inherited from
Section titled “Inherited from”nativeToValue()
Section titled “nativeToValue()”nativeToValue(
value):Val
NativeToValue converts the input value to a CEL ref.Val.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”registerDescriptor()
Section titled “registerDescriptor()”registerDescriptor(
fileDesc):void
RegisterDescriptor registers a protocol buffer file descriptor.
Parameters
Section titled “Parameters”fileDesc
Section titled “fileDesc”unknown
Returns
Section titled “Returns”void
registerMessage()
Section titled “registerMessage()”registerMessage(
message):void
RegisterMessage registers a protocol buffer message and its dependencies.
Parameters
Section titled “Parameters”message
Section titled “message”unknown
Returns
Section titled “Returns”void
registerType()
Section titled “registerType()”registerType(…
types):void
RegisterType registers a type value with the provider.
Parameters
Section titled “Parameters”…RefType[]
Returns
Section titled “Returns”void
value()
Section titled “value()”value(
typeName,fields):Val
Value creates a new type value from a qualified name and map of field name to value.
Parameters
Section titled “Parameters”typeName
Section titled “typeName”string
fields
Section titled “fields”Record<string, Val>