Re:The Saga of the Closure Compiler, and Why TypeScript Won
by stevage on Thursday September 28, 2023 @06:37PM
(#37696830)
Funny, I actually wrote and maintain a library which, amongst other things, does almost the same thing as your contrived example, except it's camelCase to kebab-case. It's written in Flow though, because that was what I knew at the time.
[ Parent
| on HN ]
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...