Closed michaeljohansen closed 4 months ago
I work exclusively with typed languages on the backend so I would welcome this. However, it's @Beck-berry who is going to do the work, so she has to be ok with it.
Beki and I had a pair coding session where we rewrote most of the code to TypeScript. 🚀 PR coming on Monday.
The codebase is currently plain JavaScript, which means we have no type information. The frontend community has largely moved towards using TypeScript, a superset of JavaScript, which enables declaration of types and ensures types are correct. This prevents a whole class of bugs, and improves the ability of developer tools significantly.
The estimates on how many bugs TypeScript prevents varies a lot, but I was at JSConf Hawaii in 2019 where a talk from Airbnb found that 38% of bugs in a project were preventable with TypeScript alone. I'd say this is a high figure, but I wouldn't be surprised if around 20% of bugs are prevented in this codebase (which is still a very high figure, so worth it).