jstype property

  1. @TagNumber(6)
FieldOptions_JSType 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.

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

Implementation

@$pb.TagNumber(6)
FieldOptions_JSType get jstype => $_getN(4);
  1. @TagNumber(6)
void jstype=(FieldOptions_JSType v)

Implementation

@$pb.TagNumber(6)
set jstype(FieldOptions_JSType v) { setField(6, v); }