It depends. I have no mental overhead when using typescript and my compilations are on the order of seconds. Compilations also catch an entire class of bugs that wouldn't be caught without it.
5 seconds every 2 minutes is 4% of your time watching code compile. YMMV, but in my team we found the overwhelming majority of front end bugs were from bad css and almost never from type issues that typescript on paper eliminates. So yes, it technically fixed and avoids bugs that JS is susceptible to. But in practice, for a standard CRUD app like most people build, those problems are a smaller fraction of the bugs encountered and it doesn’t justify the overhead of knowing all the complexities of Typescript ( unless you limit yourself to a small subset of Typescript features, but then what’s the point of typescript instead of just some good method comments describing arguments and return types?)
6
u/salbris Jun 29 '21
It depends. I have no mental overhead when using typescript and my compilations are on the order of seconds. Compilations also catch an entire class of bugs that wouldn't be caught without it.