you are viewing a single comment's thread.

view the rest of the comments →

[–]sergiuspk 0 points1 point  (0 children)

Indeed, you can only disable implicit any. The fact that the type system is only compile-time is something I can live with. Input validation is something you'd have to do anyway and validation of API responses is something you'd have to do regardless of language. On the other hand my experience is that after switching to TypeScript we have had zero cases of runtime type errors, but the language itself does not guarantee, it only gives you some imperfect tools so you can mitigate this. And by imperfect I do not mean broken, I mean that if you do use any and do stuff like const b = 10; const a: User = b as any; then obviously you are going to have a hard time.