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
Add Javascript convenience getters/setters. #5449
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
Je l'ai signé! |
CLAs look good, thanks! |
Just for motivation, this would enable ES2015-idiomatic use of protobuf and reduce a lot of boilerplate code. function registerUser(user: UserMessage) {
const {email, password, name} = user;
db.insert("users", {email, password, name, createdAt: Date.now()});
} Might also be a way to address protocolbuffers/protobuf-javascript#81 without breaking backwards compatability (by having the getters return default values) but I'm not sure if that's something we want to do. EDIT: Actually I don't think this should be used to address protocolbuffers/protobuf-javascript#81 (rather have an option on the CLI/in the |
@TeBoring Is this one of what we need for being compatible with react? And do we need IE8 supported? |
Thanks @travigd. This is really useful. I'll do some experiment internally. See whether it works. |
This looks great, looking forward to getting this merged. |
This would resolve the problem that was root cause for creating #5397 as well would enable to simplify typings in grpc-web significantly. |
The new code has some issue with our internal toolchain. Still working on that. |
Any update on this, guys? |
Hi, @TeBoring, any updates? Anything you need me to do? We could also put this behind some kind of feature/CLI flag if we're worried about incompatibilities, yeah? |
Bump! It's been over a year since this has been opened... |
In the mean time, we used code generation to generate client code which
works quite well.
…On Sat, 1 Feb 2020, 15:58 Travis DePrato, ***@***.***> wrote:
Bump! It's been over a year since this has been opened...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5449?email_source=notifications&email_token=AACYEF5VR2C2BMVYRNQRD3DRAWLZHA5CNFSM4GJWXJ62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRAIBA#issuecomment-581043204>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACYEF4IZBERSWGQUB42HJLRAWLZHANCNFSM4GJWXJ6Q>
.
|
Can someone please help me with this issue? I think the question in the link is somewhat related to this. |
Could you please let us know what happen to this PR? |
bump? |
any progress? |
If someone else wants to spearhead this, feel free. |
Let it is open? at least still have a hope to merge. |
This is kind of a proof of concept.
I'm happy to add requisite tests and whatnot though I confess I'm not really sure (as of right now) how/where I would do that. It works for me™. Suggestions/guidance appreciated.
Would fix protocolbuffers/protobuf-javascript#93.