2 ms·
If you ever had to do a large refactoring project, I would predict that you either: 1. Had great typing 2. Had very comprehensive automated (unit) testing 3. H
by treve 8y ago
If you ever had to do a large refactoring project, I would predict that you either:
1. Had great typing
2. Had very comprehensive automated (unit) testing
3. Had a very difficult time
If you are tremendously diligent in writing tests for everything, the additional benefit of typing (in language where it's optional) is lower. The biggest advantage that typing offers in those scenarios is that there's a large amount of tests that you no longer need to write.
Ultimately with static typing and testing you test for the contract of your code and static typing is much faster.
If you are just thinking of adding typescript to an existing javascript application, this benefit will not be immediately obvious. Using typescript will over time change how you write code, and when you get to that point it will be better, I guarantee it.