ProtoEnum
ProtoEnum represents a strongly typed protobuf enum value.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ProtoEnum(
enumDescValue,numberValue):ProtoEnum
Parameters
Section titled “Parameters”enumDescValue
Section titled “enumDescValue”DescEnum
numberValue
Section titled “numberValue”bigint
Returns
Section titled “Returns”ProtoEnum
Methods
Section titled “Methods”convertToNative()
Section titled “convertToNative()”convertToNative(
typeDesc?):unknown
convertToNative converts the enum number to a protobuf-compatible numeric value.
Parameters
Section titled “Parameters”typeDesc?
Section titled “typeDesc?”unknown
Returns
Section titled “Returns”unknown
Implementation of
Section titled “Implementation of”convertToType()
Section titled “convertToType()”convertToType(
typeValue):Val
convertToType converts an enum to int, string, its declared type, or type metadata.
Parameters
Section titled “Parameters”typeValue
Section titled “typeValue”Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”enumDescriptor()
Section titled “enumDescriptor()”enumDescriptor():
DescEnum
enumDescriptor returns the protobuf descriptor for the declared enum type.
Returns
Section titled “Returns”DescEnum
equal()
Section titled “equal()”equal(
other):Val
equal reports equality only for values of the same declared enum type and number.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”type()
Section titled “type()”type():
RefType
type returns the strongly typed protobuf enum type.
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”value()
Section titled “value()”value():
bigint
value returns the signed enum number.
Returns
Section titled “Returns”bigint