You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the generator with options --js_out=import_style=commonjs,binary:. --grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:. the generated _pb.js file correctly has the get, set, has, and clear methods for interacting with the property. The _pb.d.ts file, however, describes the property using the fallback enum representation with get, set, and a MyPropCase enum for describing the _NOT_SET and set semantics.
While I understand that this is technically correct for a language generator to describe the proto message in this way (that's how backwards compatibility is supported), this doesn't really work in this case as the .d.ts file is supposed to describe the .js file.
Anyway, sorry if this is reported elsewhere, I couldn't find anything when searching.
The text was updated successfully, but these errors were encountered:
I'm no C/C++ developer so I hope the change is correct. I'm also a little lost for how to build and/or test the change.
I want to help, but will need pointers from someone who knows this project a little more that I do.
…#1184)
* Correctly support proto3 optional fields in commonjs+dts .d.ts output
Fixes#1072
* Use has_optional_keyword instead of is_optional
* Improve the readability of the condition guarding hasXxx .d.ts field generation.
Given a proto file like
Running the generator with options
--js_out=import_style=commonjs,binary:. --grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:.
the generated_pb.js
file correctly has theget
,set
,has
, andclear
methods for interacting with the property. The_pb.d.ts
file, however, describes the property using the fallback enum representation withget
,set
, and aMyPropCase
enum for describing the_NOT_SET
and set semantics.While I understand that this is technically correct for a language generator to describe the proto message in this way (that's how backwards compatibility is supported), this doesn't really work in this case as the
.d.ts
file is supposed to describe the.js
file.Anyway, sorry if this is reported elsewhere, I couldn't find anything when searching.
The text was updated successfully, but these errors were encountered: