News for hackers. Stuff that matters.
Re:The Saga of the Closure Compiler, and Why TypeScript Won by com2kid on Thursday September 28, 2023 @06:55PM (#37697026)
> 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/faa012e421d9f7f60c3e6d2d32...

Re:The Saga of the Closure Compiler, and Why TypeScript Won by stevage on Thursday September 28, 2023 @10:14PM (#37698523)
Yeah, 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.