Hacker News new | ask | show | jobs
by Kiro 4467 days ago
Can you give an example of a defect that the type system catched? You said typos but that's something JSLint would catch as well so not sure if it's a strong argument.
2 comments

This talk is about porting a AngularJS app to Typescript, and the kind of errors it catches just by adding type definitions: https://www.youtube.com/watch?v=u6TeBM_SC8w

I've not yet ported my Angular apps to Typescript but I'm very much itching to do so.

Officially we were using jshint.

Misspelled magic strings, which were replaced with enumerations.

We also had a number of bugs with unexpected type use - like a function which expected a boolean but was given a string, or even more common number/string failures.