js message support for jstype string on integers (#4332)

pull/3900/merge
Charlie Moad 7 years ago committed by Paul Yang
parent 40d6eca832
commit 579f81e1c6
  1. 11
      js/message.js

@ -922,6 +922,17 @@ jspb.Message.setProto3IntField = function(msg, fieldNumber, value) {
};
/**
* Sets the value of a non-extension integer, handled as string, field of a proto3
* @param {!jspb.Message} msg A jspb proto.
* @param {number} fieldNumber The field number.
* @param {number} value New value
* @protected
*/
jspb.Message.setProto3StringIntField = function(msg, fieldNumber, value) {
jspb.Message.setFieldIgnoringDefault_(msg, fieldNumber, value, '0');
};
/**
* Sets the value of a non-extension floating point field of a proto3
* @param {!jspb.Message} msg A jspb proto.

Loading…
Cancel
Save