jstype

    The jstype option determines the JavaScript type used for values of the field. The option is permitted only for 64 bit integral and fixed types (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING is represented as JavaScript string, which avoids loss of precision that can happen when a large value is converted to a floating point JavaScript. Specifying JS_NUMBER for the jstype causes the generated JavaScript code to use the JavaScript “number” type. The behavior of the default option JS_NORMAL is implementation dependent.

    descriptor.pb.swift:1599
    var jstype: Google_Protobuf_FieldOptions.JSType { get set }

    This option is an enum to permit additional types to be added, e.g. goog.math.Integer.

    Other members in extension

    Types

    • enum CType
    • struct EditionDefault
    • struct FeatureSupport

      Information about the support window of a feature.

    • enum JSType
    • enum OptionRetention

      If set to RETENTION_SOURCE, the option will be omitted from the binary. Note: as of January 2023, support for this is in progress and does not yet have an effect (b/264593489).

    • enum OptionTargetType

      This indicates the types of entities that the field may apply to when used as an option. If it is unset, then the field may be freely used as an option on any kind of entity. Note: as of January 2023, support for this is in progress and does not yet have an effect (b/264593489).

    Type members

    Show implementation details (1)

    Hide implementation details

    Instance members

    Show implementation details (1)

    Hide implementation details