Skip to content

Commit

Permalink
Fix jstype = JS_STRING field option
Browse files Browse the repository at this point in the history
There was a bug in  message-interface-generator.ts:

When the field option jstype = JS_STRING was set, the interface would still have a bigint property.

This problem only surfaces if the plugin parameter long_type_string is *not* set.
  • Loading branch information
timostamm committed Nov 19, 2020
1 parent 3252b37 commit b39920f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export class MessageInterfaceGenerator {
case rt.ScalarType.UINT64:
case rt.ScalarType.FIXED64:
case rt.ScalarType.SINT64:
switch (longType || this.options.normalLongType) {
switch (longType ?? rt.LongType.STRING) {
case rt.LongType.STRING:
return ts.createKeywordTypeNode(ts.SyntaxKind.StringKeyword);
case rt.LongType.NUMBER:
Expand Down

0 comments on commit b39920f

Please sign in to comment.