Replies: 2 comments 1 reply
-
Yes, pretty busy indeed. JavaScript needs a generator that only generates base types - that wouldn't have been possible without turning protobuf-ts inside out all at once... I'm working on https://connect.build/ at the moment. When that's wrapped up, I plan to spend more time on protobuf-ts again. I think it should be possible to switch to the protobuf-es base types, and provide all the nice RPC features around them. I imagine this is a few major releases ahead, though. Classes vs interfaces is a super interesting topic. There are many things like unknown fields, well-known types and other use cases that just fall into place when messages are self-describing. On the other hand, plain object types are typically easier to (de-)construct and mix. So far, object spread and destructuring have been working really well, see PlainMessage. Do you have some concrete use cases in mind where a class type would be an obstacle? |
Beta Was this translation helpful? Give feedback.
-
I see you've been busy :) https://github.com/bufbuild/protobuf-es/blob/main/docs/migrating.md#from-protobuf-ts
I get the sense from that last sentence (and the fact that you actually get paid to work on Protobuf-ES) that protobuf-ts will probably get less attention going forward. I would be happy to be wrong about that, but I'm also a realist and totally understand not wishing to support two competing implementations. I'd like to migrate to Protobuf-ES since that seems to be the future, but the switch away from plain objects and interfaces to a class-based implementation is a tough pill to swallow.
P.S. that
oneof
representation looks great!Beta Was this translation helpful? Give feedback.
All reactions