Open robdodson opened 2 years ago
Versions of relevant software used
What happened I think this may be related to https://github.com/improbable-eng/ts-protoc-gen/issues/182
We're using Goa to generate our .proto files. If you name a field message in Goa, it will rename it to message_ in the .proto.
message
message_
.proto
note.proto
message Note { string message_ = 1; }
If you then process this proto using ts-protoc-gen, the toObject method does not conform to AsObject:
toObject
AsObject
note.d.ts
export namespace Note { export type AsObject = { message_: string, } }
_notepb.js
proto.voc_admin.Note.toObject = function(includeInstance, msg) { var f, obj = { message: jspb.Message.getFieldWithDefault(msg, 1, "") }; // ... };
What you expected to happen The property should be named message_ in the object returned from note_pb.js.
note_pb.js
How to reproduce it (as minimally and precisely as possible): Create a field with a trailing underscore in your .proto file.
Versions of relevant software used
What happened I think this may be related to https://github.com/improbable-eng/ts-protoc-gen/issues/182
We're using Goa to generate our .proto files. If you name a field
message
in Goa, it will rename it tomessage_
in the.proto
.note.proto
If you then process this proto using ts-protoc-gen, the
toObject
method does not conform toAsObject
:note.d.ts
_notepb.js
What you expected to happen The property should be named
message_
in the object returned fromnote_pb.js
.How to reproduce it (as minimally and precisely as possible): Create a field with a trailing underscore in your
.proto
file.