Re:Arguing against using protobuffers
by fixermark on Thursday October 11, 2018 @08:54AM
(#18193065)
I believe that means you're more or less using it as intended. Protobuffers are intended for serialization. In go, serialization is often handled at a separate layer from the business logic.
Re:Arguing against using protobuffers
by traviscline on Thursday October 11, 2018 @11:46PM
(#18199039)
You might consider https://godoc.org/github.com/tmc/grpcutil/protoc-gen-tstypes
For TypeScript, I'm using ts-protoc-gen [1]. The weird part, which I don't fully understand, is that the serialization code is emitted as JavaScript code. All the type definitions end up in a .d.ts file, but the client is a .js file. Which means you still get type safety and autocompletion, just like plain TS, but it's still weird to me.
[1] https://github.com/improbable-eng/ts-protoc-gen