Skip to content
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

fromObject or Equivalent support #9

Closed
geekgonecrazy opened this issue Jun 1, 2017 · 4 comments
Closed

fromObject or Equivalent support #9

geekgonecrazy opened this issue Jun 1, 2017 · 4 comments

Comments

@geekgonecrazy
Copy link

First this is awesome. Loving being able to use typescript and grpc on the client.

The toObject function is perfect for being able to get a usable object. But would be great to be able to convert back from an object.

So say i'm using one of these fancy frameworks with two way binding. I do toObject... modify values, and then need to send it back. Of course I can build the message manually. But would be fantastic to be able to run a fromObject(object) and have a message ready to go.

@MarcusLongmuir
Copy link
Contributor

Agreed. The discussion around the fromObject function appears to be happening here on the protobuf project.

Until it's available in the JavaScript output it would be difficult to add this function to the classes via this plugin.

@geekgonecrazy
Copy link
Author

Is this a wontfix? Or why the close?

@MarcusLongmuir
Copy link
Contributor

@geekgonecrazy: This functionality requires changes to protoc - in it's current form this plugin can only declare the contents of the JavaScript file that protoc generates. If you can propose a solution that doesn't require this change then we might be able to make progress, otherwise this issue is the right place to pursue this.

@geekgonecrazy
Copy link
Author

👍 thanks for the upstream reference. I'll track there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants