Interface DescMessage

Describes a message declaration in a protobuf source file.

interface DescMessage {
    deprecated: boolean;
    fields: DescField[];
    file: DescFile;
    kind: "message";
    members: (DescField | DescOneof)[];
    name: string;
    nestedEnums: DescEnum[];
    nestedExtensions: DescExtension[];
    nestedMessages: DescMessage[];
    oneofs: DescOneof[];
    parent: DescMessage;
    proto: DescriptorProto;
    typeName: string;
    getComments(): DescComments;
    getFeatures(): MergedFeatureSet;
    toString(): string;
}

Properties

deprecated: boolean

Marked as deprecated in the protobuf source.

fields: DescField[]

Fields declared for this message, including fields declared in a oneof group.

file: DescFile

The file this message was declared in.

kind: "message"
members: (DescField | DescOneof)[]

Fields and oneof groups for this message, ordered by their appearance in the protobuf source.

name: string

The name of the message, as specified in the protobuf source.

nestedEnums: DescEnum[]

Enumerations declared within the message, if any.

nestedExtensions: DescExtension[]

Extensions declared within the message, if any.

nestedMessages: DescMessage[]

Messages declared within the message, if any. This does not include synthetic messages like map entries.

oneofs: DescOneof[]

Oneof groups declared for this message. This does not include synthetic oneofs for proto3 optionals.

parent: DescMessage

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

The compiler-generated descriptor.

typeName: string

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

Methods

  • Get comments on the element in the protobuf source.

    Returns DescComments

  • Get the edition features for this protobuf element.

    Returns MergedFeatureSet

  • Returns string