Should I learn ES5, ES6 or TypeScript

BASARAT
2 min readAug 22, 2016

--

A question that keeps getting asked all over the interwebs nowadays, especially given Angular2 meteoric rise in popularity:

Before I answer I hope you are familiar with this relation:

Based on this superset:

  • So if you know TypeScript you really know (mostly) all three.
  • You are still mostly writing just JavaScript just better documented.
  • Typescript helps your learning curve

I’d like to point out all the times I’ve seen TypeScript help developers learn ES5 and ES6.

TypeScript for JavaScript

The classic WAT cases are all TypeScript errors:

A lot less things you need to teach new devs as the bad parts are now TypeScript errors.

There has been a claim that modern JavaScript still has dragons. I agree, but many of these dragons become compile time errors in TypeScript

Many others examples from that presentation would be a compile time lint errors in TypeScript.

Using TypeScript is like having Anders teaching you how to write good clean JavaScript. I am passionate about helping other developers develop great software and have a free book on TypeScript so you really have no excuse :)

PS: If you like this, don’t forget to click the heart below 🌹

--

--