3 ms·
It's probably best to think of TypeScript as a relatively light JS language extension (like JSX, Flow, or enabling proposed future JS features), not as its own
by alangpierce 8y ago
It's probably best to think of TypeScript as a relatively light JS language extension (like JSX, Flow, or enabling proposed future JS features), not as its own language, even though it's been called a separate language in the past. It's not an alternative to JavaScript, it's a set of guardrails for JavaScript that makes your code safer and hopefully makes you happier when programming. (I'm certainly happier in TS because of all of the editor features it enables, for example.)
If your goal is to grow as a developer, you should absolutely try it out and at least learn the basics. There are valid gripes, like some find it cumbersome for smaller/prototype projects (though I still prefer it over untyped JS even for small things), but it's probably best to try out both worlds (and maybe try out Flow as well) and make an informed choice from experience.
- noblethrasher 8y agoAgreed that it’s pedagogically useful to think of Typescript as a light(ish) extension, hence literture on pure JavaScript will still repay study. But, overall it's best to treat TS as its own language, especially when it comes to developing libraries. This situation isn't dissimilar to Objective-C/Cocoa where the language is a strict superset of C (as in the case of TS and JS), but the real leverage came from framework.