ts-proto 1.137.1 → 1.137.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/main.js +2 -1
- package/package.json +1 -1
package/build/main.js
CHANGED
|
@@ -904,10 +904,11 @@ function generateEncode(ctx, fullName, messageDesc) {
|
|
|
904
904
|
else {
|
|
905
905
|
// Ideally we'd reuse `writeSnippet` but it has tagging embedded inside of it.
|
|
906
906
|
const tag = ((field.number << 3) | 2) >>> 0;
|
|
907
|
+
const rhs = (x) => ((0, types_1.isLong)(field) && options.forceLong === options_1.LongOption.BIGINT ? `${x}.toString()` : x);
|
|
907
908
|
const listWriteSnippet = (0, ts_poet_1.code) `
|
|
908
909
|
writer.uint32(${tag}).fork();
|
|
909
910
|
for (const v of message.${fieldName}) {
|
|
910
|
-
writer.${(0, types_1.toReaderCall)(field)}(v);
|
|
911
|
+
writer.${(0, types_1.toReaderCall)(field)}(${rhs("v")});
|
|
911
912
|
}
|
|
912
913
|
writer.ldelim();
|
|
913
914
|
`;
|