Skip to content

Commit bccb33a

Browse files
committed
fix: allow export on needed methods
1 parent a8e7a0c commit bccb33a

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

binary/reader.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ jspb.BinaryReader.prototype.getWireType = function() {
211211
/**
212212
* @return {boolean} Whether the current wire type is a delimited field. Used to
213213
* conditionally parse packed repeated fields.
214+
* @export
214215
*/
215216
jspb.BinaryReader.prototype.isDelimited = function() {
216217
return this.nextWireType_ == jspb.BinaryConstants.WireType.DELIMITED;
@@ -574,6 +575,7 @@ jspb.BinaryReader.prototype.readMessage = function(message, reader) {
574575
* @param {number} field
575576
* @param {T} message
576577
* @param {function(T, !jspb.BinaryReader)} reader
578+
* @export
577579
*/
578580
jspb.BinaryReader.prototype.readGroup =
579581
function(field, message, reader) {
@@ -678,6 +680,7 @@ jspb.BinaryReader.prototype.readInt64String = function() {
678680
* error if the next field in the stream is not of the correct wire type.
679681
*
680682
* @return {number} The value of the unsigned 32-bit integer field.
683+
* @export
681684
*/
682685
jspb.BinaryReader.prototype.readUint32 = function() {
683686
goog.asserts.assert(
@@ -707,6 +710,7 @@ jspb.BinaryReader.prototype.readUint32String = function() {
707710
* error if the next field in the stream is not of the correct wire type.
708711
*
709712
* @return {number} The value of the unsigned 64-bit integer field.
713+
* @export
710714
*/
711715
jspb.BinaryReader.prototype.readUint64 = function() {
712716
goog.asserts.assert(
@@ -737,6 +741,7 @@ jspb.BinaryReader.prototype.readUint64String = function() {
737741
* wire type.
738742
*
739743
* @return {number} The value of the signed 32-bit integer field.
744+
* @export
740745
*/
741746
jspb.BinaryReader.prototype.readSint32 = function() {
742747
goog.asserts.assert(
@@ -751,6 +756,7 @@ jspb.BinaryReader.prototype.readSint32 = function() {
751756
* wire type.
752757
*
753758
* @return {number} The value of the signed 64-bit integer field.
759+
* @export
754760
*/
755761
jspb.BinaryReader.prototype.readSint64 = function() {
756762
goog.asserts.assert(
@@ -779,6 +785,7 @@ jspb.BinaryReader.prototype.readSint64String = function() {
779785
* wire type.
780786
*
781787
* @return {number} The value of the double field.
788+
* @export
782789
*/
783790
jspb.BinaryReader.prototype.readFixed32 = function() {
784791
goog.asserts.assert(
@@ -793,6 +800,7 @@ jspb.BinaryReader.prototype.readFixed32 = function() {
793800
* wire type.
794801
*
795802
* @return {number} The value of the float field.
803+
* @export
796804
*/
797805
jspb.BinaryReader.prototype.readFixed64 = function() {
798806
goog.asserts.assert(
@@ -824,6 +832,7 @@ jspb.BinaryReader.prototype.readFixed64String = function() {
824832
* type.
825833
*
826834
* @return {number} The value of the signed 32-bit integer field.
835+
* @export
827836
*/
828837
jspb.BinaryReader.prototype.readSfixed32 = function() {
829838
goog.asserts.assert(
@@ -853,6 +862,7 @@ jspb.BinaryReader.prototype.readSfixed32String = function() {
853862
* type.
854863
*
855864
* @return {number} The value of the sfixed64 field.
865+
* @export
856866
*/
857867
jspb.BinaryReader.prototype.readSfixed64 = function() {
858868
goog.asserts.assert(
@@ -882,6 +892,7 @@ jspb.BinaryReader.prototype.readSfixed64String = function() {
882892
* error if the next field in the stream is not of the correct wire type.
883893
*
884894
* @return {number} The value of the float field.
895+
* @export
885896
*/
886897
jspb.BinaryReader.prototype.readFloat = function() {
887898
goog.asserts.assert(
@@ -895,6 +906,7 @@ jspb.BinaryReader.prototype.readFloat = function() {
895906
* error if the next field in the stream is not of the correct wire type.
896907
*
897908
* @return {number} The value of the double field.
909+
* @export
898910
*/
899911
jspb.BinaryReader.prototype.readDouble = function() {
900912
goog.asserts.assert(
@@ -908,6 +920,7 @@ jspb.BinaryReader.prototype.readDouble = function() {
908920
* field in the stream is not of the correct wire type.
909921
*
910922
* @return {boolean} The value of the boolean field.
923+
* @export
911924
*/
912925
jspb.BinaryReader.prototype.readBool = function() {
913926
goog.asserts.assert(
@@ -921,6 +934,7 @@ jspb.BinaryReader.prototype.readBool = function() {
921934
* field in the stream is not of the correct wire type.
922935
*
923936
* @return {number} The value of the enum field.
937+
* @export
924938
*/
925939
jspb.BinaryReader.prototype.readEnum = function() {
926940
goog.asserts.assert(
@@ -1078,6 +1092,7 @@ jspb.BinaryReader.prototype.readPackedField_ = function(decodeMethod) {
10781092
* Reads a packed int32 field, which consists of a length header and a list of
10791093
* signed varints.
10801094
* @return {!Array<number>}
1095+
* @export
10811096
*/
10821097
jspb.BinaryReader.prototype.readPackedInt32 = function() {
10831098
return this.readPackedField_(this.decoder_.readSignedVarint32);
@@ -1098,6 +1113,7 @@ jspb.BinaryReader.prototype.readPackedInt32String = function() {
10981113
* Reads a packed int64 field, which consists of a length header and a list of
10991114
* signed varints.
11001115
* @return {!Array<number>}
1116+
* @export
11011117
*/
11021118
jspb.BinaryReader.prototype.readPackedInt64 = function() {
11031119
return this.readPackedField_(this.decoder_.readSignedVarint64);
@@ -1118,6 +1134,7 @@ jspb.BinaryReader.prototype.readPackedInt64String = function() {
11181134
* Reads a packed uint32 field, which consists of a length header and a list of
11191135
* unsigned varints.
11201136
* @return {!Array<number>}
1137+
* @export
11211138
*/
11221139
jspb.BinaryReader.prototype.readPackedUint32 = function() {
11231140
return this.readPackedField_(this.decoder_.readUnsignedVarint32);
@@ -1138,6 +1155,7 @@ jspb.BinaryReader.prototype.readPackedUint32String = function() {
11381155
* Reads a packed uint64 field, which consists of a length header and a list of
11391156
* unsigned varints.
11401157
* @return {!Array<number>}
1158+
* @export
11411159
*/
11421160
jspb.BinaryReader.prototype.readPackedUint64 = function() {
11431161
return this.readPackedField_(this.decoder_.readUnsignedVarint64);
@@ -1158,6 +1176,7 @@ jspb.BinaryReader.prototype.readPackedUint64String = function() {
11581176
* Reads a packed sint32 field, which consists of a length header and a list of
11591177
* zigzag varints.
11601178
* @return {!Array<number>}
1179+
* @export
11611180
*/
11621181
jspb.BinaryReader.prototype.readPackedSint32 = function() {
11631182
return this.readPackedField_(this.decoder_.readZigzagVarint32);
@@ -1168,6 +1187,7 @@ jspb.BinaryReader.prototype.readPackedSint32 = function() {
11681187
* Reads a packed sint64 field, which consists of a length header and a list of
11691188
* zigzag varints.
11701189
* @return {!Array<number>}
1190+
* @export
11711191
*/
11721192
jspb.BinaryReader.prototype.readPackedSint64 = function() {
11731193
return this.readPackedField_(this.decoder_.readZigzagVarint64);
@@ -1188,6 +1208,7 @@ jspb.BinaryReader.prototype.readPackedSint64String = function() {
11881208
* Reads a packed fixed32 field, which consists of a length header and a list
11891209
* of unsigned 32-bit ints.
11901210
* @return {!Array<number>}
1211+
* @export
11911212
*/
11921213
jspb.BinaryReader.prototype.readPackedFixed32 = function() {
11931214
return this.readPackedField_(this.decoder_.readUint32);
@@ -1198,6 +1219,7 @@ jspb.BinaryReader.prototype.readPackedFixed32 = function() {
11981219
* Reads a packed fixed64 field, which consists of a length header and a list
11991220
* of unsigned 64-bit ints.
12001221
* @return {!Array<number>}
1222+
* @export
12011223
*/
12021224
jspb.BinaryReader.prototype.readPackedFixed64 = function() {
12031225
return this.readPackedField_(this.decoder_.readUint64);
@@ -1218,6 +1240,7 @@ jspb.BinaryReader.prototype.readPackedFixed64String = function() {
12181240
* Reads a packed sfixed32 field, which consists of a length header and a list
12191241
* of 32-bit ints.
12201242
* @return {!Array<number>}
1243+
* @export
12211244
*/
12221245
jspb.BinaryReader.prototype.readPackedSfixed32 = function() {
12231246
return this.readPackedField_(this.decoder_.readInt32);
@@ -1228,6 +1251,7 @@ jspb.BinaryReader.prototype.readPackedSfixed32 = function() {
12281251
* Reads a packed sfixed64 field, which consists of a length header and a list
12291252
* of 64-bit ints.
12301253
* @return {!Array<number>}
1254+
* @export
12311255
*/
12321256
jspb.BinaryReader.prototype.readPackedSfixed64 = function() {
12331257
return this.readPackedField_(this.decoder_.readInt64);
@@ -1248,6 +1272,7 @@ jspb.BinaryReader.prototype.readPackedSfixed64String = function() {
12481272
* Reads a packed float field, which consists of a length header and a list of
12491273
* floats.
12501274
* @return {!Array<number>}
1275+
* @export
12511276
*/
12521277
jspb.BinaryReader.prototype.readPackedFloat = function() {
12531278
return this.readPackedField_(this.decoder_.readFloat);
@@ -1258,6 +1283,7 @@ jspb.BinaryReader.prototype.readPackedFloat = function() {
12581283
* Reads a packed double field, which consists of a length header and a list of
12591284
* doubles.
12601285
* @return {!Array<number>}
1286+
* @export
12611287
*/
12621288
jspb.BinaryReader.prototype.readPackedDouble = function() {
12631289
return this.readPackedField_(this.decoder_.readDouble);
@@ -1268,6 +1294,7 @@ jspb.BinaryReader.prototype.readPackedDouble = function() {
12681294
* Reads a packed bool field, which consists of a length header and a list of
12691295
* unsigned varints.
12701296
* @return {!Array<boolean>}
1297+
* @export
12711298
*/
12721299
jspb.BinaryReader.prototype.readPackedBool = function() {
12731300
return this.readPackedField_(this.decoder_.readBool);
@@ -1278,6 +1305,7 @@ jspb.BinaryReader.prototype.readPackedBool = function() {
12781305
* Reads a packed enum field, which consists of a length header and a list of
12791306
* unsigned varints.
12801307
* @return {!Array<number>}
1308+
* @export
12811309
*/
12821310
jspb.BinaryReader.prototype.readPackedEnum = function() {
12831311
return this.readPackedField_(this.decoder_.readEnum);

binary/writer.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,6 +1195,7 @@ jspb.BinaryWriter.prototype.writeRepeatedSintHash64 = function(field, value) {
11951195
* works for both signed and unsigned fixed32s.
11961196
* @param {number} field The field number.
11971197
* @param {?Array<number>} value The array of ints to write.
1198+
* @export
11981199
*/
11991200
jspb.BinaryWriter.prototype.writeRepeatedFixed32 = function(field, value) {
12001201
if (value == null) return;
@@ -1209,6 +1210,7 @@ jspb.BinaryWriter.prototype.writeRepeatedFixed32 = function(field, value) {
12091210
* works for both signed and unsigned fixed64s.
12101211
* @param {number} field The field number.
12111212
* @param {?Array<number>} value The array of ints to write.
1213+
* @export
12121214
*/
12131215
jspb.BinaryWriter.prototype.writeRepeatedFixed64 = function(field, value) {
12141216
if (value == null) return;
@@ -1223,6 +1225,7 @@ jspb.BinaryWriter.prototype.writeRepeatedFixed64 = function(field, value) {
12231225
* works for both signed and unsigned fixed64s.
12241226
* @param {number} field The field number.
12251227
* @param {?Array<string>} value The array of decimal strings to write.
1228+
* @export
12261229
*/
12271230
jspb.BinaryWriter.prototype.writeRepeatedFixed64String = function(
12281231
field, value) {
@@ -1237,6 +1240,7 @@ jspb.BinaryWriter.prototype.writeRepeatedFixed64String = function(
12371240
* Writes an array of numbers to the buffer as a repeated sfixed32 field.
12381241
* @param {number} field The field number.
12391242
* @param {?Array<number>} value The array of ints to write.
1243+
* @export
12401244
*/
12411245
jspb.BinaryWriter.prototype.writeRepeatedSfixed32 = function(field, value) {
12421246
if (value == null) return;
@@ -1250,6 +1254,7 @@ jspb.BinaryWriter.prototype.writeRepeatedSfixed32 = function(field, value) {
12501254
* Writes an array of numbers to the buffer as a repeated sfixed64 field.
12511255
* @param {number} field The field number.
12521256
* @param {?Array<number>} value The array of ints to write.
1257+
* @export
12531258
*/
12541259
jspb.BinaryWriter.prototype.writeRepeatedSfixed64 = function(field, value) {
12551260
if (value == null) return;
@@ -1277,6 +1282,7 @@ jspb.BinaryWriter.prototype.writeRepeatedSfixed64String = function(field, value)
12771282
* Writes an array of numbers to the buffer as a repeated float field.
12781283
* @param {number} field The field number.
12791284
* @param {?Array<number>} value The array of ints to write.
1285+
* @export
12801286
*/
12811287
jspb.BinaryWriter.prototype.writeRepeatedFloat = function(field, value) {
12821288
if (value == null) return;
@@ -1290,6 +1296,7 @@ jspb.BinaryWriter.prototype.writeRepeatedFloat = function(field, value) {
12901296
* Writes an array of numbers to the buffer as a repeated double field.
12911297
* @param {number} field The field number.
12921298
* @param {?Array<number>} value The array of ints to write.
1299+
* @export
12931300
*/
12941301
jspb.BinaryWriter.prototype.writeRepeatedDouble = function(field, value) {
12951302
if (value == null) return;
@@ -1303,6 +1310,7 @@ jspb.BinaryWriter.prototype.writeRepeatedDouble = function(field, value) {
13031310
* Writes an array of booleans to the buffer as a repeated bool field.
13041311
* @param {number} field The field number.
13051312
* @param {?Array<boolean>} value The array of ints to write.
1313+
* @export
13061314
*/
13071315
jspb.BinaryWriter.prototype.writeRepeatedBool = function(field, value) {
13081316
if (value == null) return;
@@ -1316,6 +1324,7 @@ jspb.BinaryWriter.prototype.writeRepeatedBool = function(field, value) {
13161324
* Writes an array of enums to the buffer as a repeated enum field.
13171325
* @param {number} field The field number.
13181326
* @param {?Array<number>} value The array of ints to write.
1327+
* @export
13191328
*/
13201329
jspb.BinaryWriter.prototype.writeRepeatedEnum = function(field, value) {
13211330
if (value == null) return;
@@ -1329,6 +1338,7 @@ jspb.BinaryWriter.prototype.writeRepeatedEnum = function(field, value) {
13291338
* Writes an array of strings to the buffer as a repeated string field.
13301339
* @param {number} field The field number.
13311340
* @param {?Array<string>} value The array of strings to write.
1341+
* @export
13321342
*/
13331343
jspb.BinaryWriter.prototype.writeRepeatedString = function(field, value) {
13341344
if (value == null) return;
@@ -1343,6 +1353,7 @@ jspb.BinaryWriter.prototype.writeRepeatedString = function(field, value) {
13431353
* @param {number} field The field number.
13441354
* @param {?Array<!jspb.ByteSource>} value The arrays of arrays of bytes to
13451355
* write.
1356+
* @export
13461357
*/
13471358
jspb.BinaryWriter.prototype.writeRepeatedBytes = function(field, value) {
13481359
if (value == null) return;
@@ -1360,6 +1371,7 @@ jspb.BinaryWriter.prototype.writeRepeatedBytes = function(field, value) {
13601371
* write.
13611372
* @param {function(MessageType, !jspb.BinaryWriter)} writerCallback
13621373
* Will be invoked with the value to write and the writer to write it with.
1374+
* @export
13631375
*/
13641376
jspb.BinaryWriter.prototype.writeRepeatedMessage = function(
13651377
field, value, writerCallback) {
@@ -1380,6 +1392,7 @@ jspb.BinaryWriter.prototype.writeRepeatedMessage = function(
13801392
* write.
13811393
* @param {function(MessageType, !jspb.BinaryWriter)} writerCallback
13821394
* Will be invoked with the value to write and the writer to write it with.
1395+
* @export
13831396
*/
13841397
jspb.BinaryWriter.prototype.writeRepeatedGroup = function(
13851398
field, value, writerCallback) {
@@ -1684,6 +1697,7 @@ jspb.BinaryWriter.prototype.writePackedSintHash64 = function(field, value) {
16841697
* Writes an array of numbers to the buffer as a packed fixed32 field.
16851698
* @param {number} field The field number.
16861699
* @param {?Array<number>} value The array of ints to write.
1700+
* @export
16871701
*/
16881702
jspb.BinaryWriter.prototype.writePackedFixed32 = function(field, value) {
16891703
if (value == null || !value.length) return;
@@ -1699,6 +1713,7 @@ jspb.BinaryWriter.prototype.writePackedFixed32 = function(field, value) {
16991713
* Writes an array of numbers to the buffer as a packed fixed64 field.
17001714
* @param {number} field The field number.
17011715
* @param {?Array<number>} value The array of ints to write.
1716+
* @export
17021717
*/
17031718
jspb.BinaryWriter.prototype.writePackedFixed64 = function(field, value) {
17041719
if (value == null || !value.length) return;
@@ -1731,6 +1746,7 @@ jspb.BinaryWriter.prototype.writePackedFixed64String = function(field, value) {
17311746
* Writes an array of numbers to the buffer as a packed sfixed32 field.
17321747
* @param {number} field The field number.
17331748
* @param {?Array<number>} value The array of ints to write.
1749+
* @export
17341750
*/
17351751
jspb.BinaryWriter.prototype.writePackedSfixed32 = function(field, value) {
17361752
if (value == null || !value.length) return;
@@ -1746,6 +1762,7 @@ jspb.BinaryWriter.prototype.writePackedSfixed32 = function(field, value) {
17461762
* Writes an array of numbers to the buffer as a packed sfixed64 field.
17471763
* @param {number} field The field number.
17481764
* @param {?Array<number>} value The array of ints to write.
1765+
* @export
17491766
*/
17501767
jspb.BinaryWriter.prototype.writePackedSfixed64 = function(field, value) {
17511768
if (value == null || !value.length) return;
@@ -1776,6 +1793,7 @@ jspb.BinaryWriter.prototype.writePackedSfixed64String = function(field, value) {
17761793
* Writes an array of numbers to the buffer as a packed float field.
17771794
* @param {number} field The field number.
17781795
* @param {?Array<number>} value The array of ints to write.
1796+
* @export
17791797
*/
17801798
jspb.BinaryWriter.prototype.writePackedFloat = function(field, value) {
17811799
if (value == null || !value.length) return;
@@ -1791,6 +1809,7 @@ jspb.BinaryWriter.prototype.writePackedFloat = function(field, value) {
17911809
* Writes an array of numbers to the buffer as a packed double field.
17921810
* @param {number} field The field number.
17931811
* @param {?Array<number>} value The array of ints to write.
1812+
* @export
17941813
*/
17951814
jspb.BinaryWriter.prototype.writePackedDouble = function(field, value) {
17961815
if (value == null || !value.length) return;
@@ -1806,6 +1825,7 @@ jspb.BinaryWriter.prototype.writePackedDouble = function(field, value) {
18061825
* Writes an array of booleans to the buffer as a packed bool field.
18071826
* @param {number} field The field number.
18081827
* @param {?Array<boolean>} value The array of ints to write.
1828+
* @export
18091829
*/
18101830
jspb.BinaryWriter.prototype.writePackedBool = function(field, value) {
18111831
if (value == null || !value.length) return;
@@ -1821,6 +1841,7 @@ jspb.BinaryWriter.prototype.writePackedBool = function(field, value) {
18211841
* Writes an array of enums to the buffer as a packed enum field.
18221842
* @param {number} field The field number.
18231843
* @param {?Array<number>} value The array of ints to write.
1844+
* @export
18241845
*/
18251846
jspb.BinaryWriter.prototype.writePackedEnum = function(field, value) {
18261847
if (value == null || !value.length) return;

0 commit comments

Comments
 (0)