Closed psigen closed 2 years ago
Any updates on this?
Well, in doing some testing, I am not sure if this PR is actually going to work.
The issue is that the internal fromObject follows its own rules and doesn't seem to correspond to a straightforward JS object, instead it is structuring things in its own way. The resulting input object isn't necessarily intuitive to use.
For the record, I have given up on this implementation and have been using protoc-gen-ts
with much more success. It generates intuitive TypeScript objects and typing with minimal fuss and has to/fromObject
conversions that so far seem quite effective and straightforward.
Adds the
fromObject
helper to the public API of generated pb classes.This closes a 5-year-old open issue: protocolbuffers/protobuf-javascript#96 by rebasing this 1-year-old open PR: https://github.com/protocolbuffers/protobuf/pull/8488 based on this 4-year-old workaround: protocolbuffers/protobuf-javascript#96
From the original issue: