In the long run is it valuable to learn typescript still considering that es6 exists. I know es6 still doesn't have a lot of support by browsers, but I assume within a couple of years that will change and for now there's babel at least.
I'm a software dev, primarily coding in java and node. Pretty sick of learning new javascript frameworks/library, though definitely willing to learn typescript if it's much more advantageous than es6 (I already use es6).
The only real benefits I can see for Typescript are private datatypes and static type checking (and static types are a subjective benefit), now that es6 has classes and bracket scope with the 'let' keyword
Can anyone shed some light on this situation, perhaps what situations would be best to use typescript and why?
I'm not very expert in typescript, but new JavaScript technologies as AngularJS are based in typescript and you must have a basic knowledge of it in order to develop in AngularJS. Hope was useful!
I agree with What Matt Strom said there are tons of benefits. I have written a article why it is right time to learn TypeScript. You can see that here.
Yes!, hands down, without a doubt it is still valuable to learn TypeScript.
TypeScript is valuable in any situation where you would use JavaScript. These days I will not make a JavaScript file unless I'm forced to. It's even possible to register an external handler with your TypeScript modules so that Node will run them without the need for the compilation step (see ts-node).
Don't underestimate the benefit of static type checking. TypeScript, when used properly with strict type coverage, can eliminate a whole class of runtime errors. Refactoring is easy and anxiety-free, especially if you use an IDE with integrated TypeScript tooling. Using string literal types and enums, you can enforce that arguments match only a discrete set of values. With a tool like Typedoc, your documentation can be generated automatically and consistently, checked by the compiler.
TypeScript is more than just a transpiler for ES6 syntax. It allows you to use tomorrow's JavaScript today. TypeScript will allow you to use features like ES7
async-awaitfunctions now. Other advanced features that you will come to find invaluable are decorators (akin to C# attributes or Java annotations) and reflection. When ES2018 hits the stage, TypeScript will allow you to use its features while still targeting ES5 or ES6.TypeScript can also graft in different module systems. Say that you are building for browsers that don't support ES6 modules yet. TypeScript will enable you to write your code using
import-exportstatements (which are also statically analyzable) but compile your code as ES2015, CommonJS, UMD, AMD, or RequireJS modules.Adopting TypeScript is very easy. You can learn and use as much or as little as you want. Being a superset of JavaScript, all JavaScript is valid TypeScript; it's entirely opt-in. The TypeScript compiler can even perform basic type checking on plain JS files. If you work on large projects with 10,000+ LOCs or with multiple contributors, you will not regret adopting TypeScript.
This YouTube video is a great testimonial from an engineer at Slack about their decision to migrate to TypeScript: How I Learned to Stop Worrying and Trust the Compiler