Re:I Was Wrong About TypeScript
by swax on Sunday June 05, 2016 @08:31PM
(#11843926)
A major benefit is the ability to quickly understand code you didn't write because you have the ability to 'go to definition' or 'find all references' which works across multiple files. On top of that once you understand the code and need to modify it you can quickly refactor across multiple files instantly and with a high degree of confidence.
Types are not a substitute for tests, but they eliminate an entire class of bugs that are screened out at compile time. That way you can focus your tests on functionality and not silly mistakes.
Re:I Was Wrong About TypeScript
by ec109695 on Sunday June 05, 2016 @10:02PM
(#11844195)
Which ide are you using? WebStorm, for example, gets easily confused about common JS idioms, which makes its tipped hinting useless in many situations. This makes refactoring a pain since you can't perfectly trust its warnings.
Types are not a substitute for tests, but they eliminate an entire class of bugs that are screened out at compile time. That way you can focus your tests on functionality and not silly mistakes.