Interface DescEnum

Describes an enumeration in a protobuf source file.

interface DescEnum {
    deprecated: boolean;
    file: DescFile;
    kind: "enum";
    name: string;
    parent: DescMessage;
    proto: EnumDescriptorProto;
    sharedPrefix?: string;
    typeName: string;
    values: DescEnumValue[];
    getComments(): DescComments;
    getFeatures(): MergedFeatureSet;
    toString(): string;
}

Properties

deprecated: boolean

Marked as deprecated in the protobuf source.

file: DescFile

The file this enumeration was declared in.

kind: "enum"
name: string

The name of the enumeration, as declared in the protobuf source.

parent: DescMessage

The parent message, if this enumeration was declared inside a message declaration.

The compiler-generated descriptor.

sharedPrefix?: string

A prefix shared by all enum values. For example, MY_ENUM_ for enum MyEnum {MY_ENUM_A=0; MY_ENUM_B=1;}

typeName: string

The fully qualified name of the enumeration. (We omit the leading dot.)

values: DescEnumValue[]

Values declared for this enumeration.

Methods

  • Get comments on the element in the protobuf source.

    Returns DescComments

  • Get the edition features for this protobuf element.

    Returns MergedFeatureSet

  • Returns string