3 ms·
>Not having to constantly keep adding types all over You don't have to if you don't want to. >not having to constantly refactor things because I now accept ob
by pingec 13y ago
>Not having to constantly keep adding types all over
You don't have to if you don't want to.
>not having to constantly refactor things because I now accept object instead of an int etc is refreshing
Again this is your choice, you can omit types if you want
TS gives you the option to add typing if you want it. And that is huge in my book, try refactoring a large enterprise app written in JS vs. written in TS.
- nmjohn 13y agoOkay so if you don't use types, wouldn't you would just be writing vanilla javascript and would have no reason to use typescript in the first place though?
- lmm 13y agoIt has a somewhat nicer syntax for functions and better scoping rules, but you could certainly get that from a more lightweight js extension like coffeescript yeah.
- klibertp 13y agoNot exactly, there is still type inference mechanism at work which, combined with DefinitelyTyped (https://github.com/borisyankov/DefinitelyTyped https://github.com/borisyankov/DefinitelyTyped) declarations will get you quite a lot type safety even if you won't write any type declaration by yourself.