Interface FieldList

Provides convenient access to field information of a message type.

interface FieldList {
    byMember(): readonly (OneofInfo | FieldInfo)[];
    byNumber(): readonly FieldInfo[];
    find(fieldNo): FieldInfo;
    findJsonName(jsonName): FieldInfo;
    list(): readonly FieldInfo[];
}

Methods

  • In order of appearance in the source, list fields and oneof groups.

    Returns readonly (OneofInfo | FieldInfo)[]

  • Return field information ordered by field number ascending.

    Returns readonly FieldInfo[]

  • Find field information by proto field number.

    Parameters

    • fieldNo: number

    Returns FieldInfo

  • Find field information by field name or json_name.

    Parameters

    • jsonName: string

    Returns FieldInfo

  • Return field information in the order they appear in the source.

    Returns readonly FieldInfo[]