3 ms·
I used to think like this, but TypeScript has saved me massive amounts of time. If you ever refactor your code, the compiler will help you trace all the depende
by programmarchy 5y ago
I used to think like this, but TypeScript has saved me massive amounts of time. If you ever refactor your code, the compiler will help you trace all the dependencies, so you don't end up with subtle bugs or broken code. In other ways, TypeScript deepens understanding of JavaScript. For example, TypeScript forces you to think explicitly about the differences between undefined and null, helping you to know the difference and to avoid a whole class of JavaScript pitfalls. You can also look at a function signature and know exactly what inputs and outputs it requires, rather than having to memorize or search docs. Even for smaller projects, I start with TypeScript now.