interface fiScalar {
    L: LongType;
    T: ScalarType;
    default: undefined | string | number | bigint | boolean | Uint8Array;
    delimited?: undefined;
    jsonName: string;
    kind: "scalar";
    localName: string;
    name: string;
    no: number;
    oneof?: OneofInfo;
    opt: boolean;
    packed: boolean;
    repeated: boolean;
}

Hierarchy

Properties

JavaScript representation of 64 bit integral types (int64, uint64, sint64, fixed64, sfixed64).

By default, this is LongType.BIGINT. Generated code will use the BigInt primitive.

With LongType.STRING, generated code will use the String primitive instead. This can be specified per field with the option [jstype = JS_STRING]:

uint64 field_a = 1; // BigInt
uint64 field_b = 2 [jstype = JS_NORMAL]; // BigInt
uint64 field_b = 2 [jstype = JS_NUMBER]; // BigInt
uint64 field_b = 2 [jstype = JS_STRING]; // String

This property is ignored for other scalar types.

Scalar type of the field.

default: undefined | string | number | bigint | boolean | Uint8Array

Only proto2: An explicit default value.

delimited?: undefined

Serialize this message with the delimited format, also known as group encoding, as opposed to the standard length prefix.

Only valid for message fields.

jsonName: string

The name for JSON serialization / deserialization.

kind: "scalar"
localName: string

The name of the field as used in generated code.

name: string

The original name of the .proto field.

no: number

The field number of the .proto field.

oneof?: OneofInfo

The oneof group, if this field belongs to one.

opt: boolean

Is the field optional?

packed: boolean

Is this repeated field packed? BYTES and STRING can never be packed, since they are length-delimited. Other types can be packed with the field option "packed". For proto3, fields are packed by default.

repeated: boolean

Is the field repeated?

Generated using TypeDoc