3 ms·
> does almost the same thing as your contrived example Sadly, not contrived! Anyone using protocol buffers is actually familiar with this exact scenario. Not
by com2kid 3y ago
> does almost the same thing as your contrived example
Sadly, not contrived!
Anyone using protocol buffers is actually familiar with this exact scenario. Not sure how the JS PB compiler handles things though, I never bothered to look under the covers.
Here is a random sample I found of both the types and the conversion code.
https://gist.github.com/alfrdmalr/faa012e421d9f7f60c3e6d2d32581157 https://gist.github.com/alfrdmalr/faa012e421d9f7f60c3e6d2d32...
- stevage 3y agoYeah, cool. In my case I didn't really get all the type stuff right - I was mostly using Flow to be able to generate documentation.