-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix nullability of non-optional fields in TS interfaces and class-level JS comments #1780
Fix nullability of non-optional fields in TS interfaces and class-level JS comments #1780
Conversation
Relevant issue is #1779 |
6486157
to
a823006
Compare
Hey, would you have ETA for when this will be merged please? |
Hello, any chance to see this merged? |
a823006
to
971c974
Compare
Hello - I have rebased this PR on top of the latest master. Also as per #1779, the change is hidden behind a new flag --pb3-optional. If the flag is not specified, the old behaviour is retained. @alexander-fenster - are you happy to merge with these changes? Let me know if there is anything else you think would be helpful. We're coming up to the next release series of our product, so for us it would be great to have this in time for that release. |
cli/pbjs.js
Outdated
@@ -148,6 +149,7 @@ exports.main = function main(args, callback) { | |||
" --force-message Enforces the use of message instances instead of plain objects.", | |||
"", | |||
" --null-defaults Default value for optional fields is null instead of zero value.", | |||
" --pb3-optional Make type declarations respect optional fields for PB3.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be just "--disable-defaults" and thats all? There is no data in grpc package on default value, so, why we should use some magic default or unexpected null value instead of nothing? It is undefined and thats all. So, just disable defaults and it'll be ok)
Thank you @martin-traverse.
Is there anything holding back approving this CR? Or are we to understand that this library is no longer being maintained and we should fork it? @alexander-fenster? That said protobuf syntax="proto3" has supported the https://github.com/protocolbuffers/protobuf/releases/tag/v3.15.0
Protocol Compiler
|
…this only sets the default of optional fields, it doesn't control whether a field is optional or not)
971c974
to
94556f9
Compare
I have rebased this change on top of the latest master. @alexander-fenster are you ok to review / approve this change now? Is there anything else you need from me? |
Hello - I am closing this PR as I have a substantially new implementation |
Please see #2011 for a more complete solution to this issue. |
No description provided.