Skip to content

ProtoEnum

ProtoEnum represents a strongly typed protobuf enum value.

new ProtoEnum(enumDescValue, numberValue): ProtoEnum

DescEnum

bigint

ProtoEnum

convertToNative(typeDesc?): unknown

convertToNative converts the enum number to a protobuf-compatible numeric value.

unknown

unknown

Val.convertToNative


convertToType(typeValue): Val

convertToType converts an enum to int, string, its declared type, or type metadata.

RefType

Val

Val.convertToType


enumDescriptor(): DescEnum

enumDescriptor returns the protobuf descriptor for the declared enum type.

DescEnum


equal(other): Val

equal reports equality only for values of the same declared enum type and number.

Val

Val

Val.equal


type(): RefType

type returns the strongly typed protobuf enum type.

RefType

Val.type


value(): bigint

value returns the signed enum number.

bigint

Val.value