stephenh / ts-proto

An idiomatic protobuf generator for TypeScript
Apache License 2.0
2.15k stars 346 forks source link

Option for remove toJSON #859

Open f0rmat1k opened 1 year ago

f0rmat1k commented 1 year ago

There is no option, to remove toJSON from output. Only both with --ts_proto_opt=outputJsonMethods=false. We are using tool on the client and we need only fromJSON there. It would be nice to have option about removing toJSON (or only fromJOSN). I can try to send PR, if you don't mind

stephenh commented 1 year ago

Hi @f0rmat1k , sure if you wanted to add support for outputJsonMethods=fromJSON, so it becomes like outputJsonMethods=true|false|fromJSON|toJSON" that sgtm. Thanks!

Frabat commented 1 year ago

Hi! I didn't read this issue but I've managed to do the same thing! I've opened a PR for this