Porting to TypeScript Solved Our API Woes
https://www.executeprogram.com/blog/porting-to-typescript-solved-our-api-woes [www.executeprogram.com]
2020-04-09 05:14
We ported our React frontend from JavaScript to TypeScript, but left the backend in Ruby. Eventually, we ported the backend to TypeScript too.
With the Ruby backend, we sometimes forgot that a particular API property held an array of strings, not a single string. Sometimes we changed a piece of the API that was referenced in multiple places but forgot to update one of those places. These are normal dynamic language problems in any system whose tests don’t have 100% test coverage. (And it will still happen even with 100% coverage; it’s just less likely.)