Being a JavaScript developer is a commitment to always be on the alert.

The learning curve never stops at a precise moment. So you’re always juggling numerous questions in your head.

“Should I learn Vue.js, React… both?”

“What about functional programming? Looks interesting!”

“Is server-side JavaScript any good?“

“Should I learn TypeScript?”

Today I feel like tackling this last question.

We recently played with TypeScript at Snipcart: we’re using it to re-write our cart’s next version. So, perfect timing to dive into TS on the blog!

This post will cover:

  1. What is TypeScript?
  2. Why should you learn it?
  3. When should you use it?
  4. How can you start learning TypeScript?

I’ve also prepared code examples to demonstrate differences between TypeScript and JavaScript.

Let’s get started!

What is TypeScript?

TypeScript is a statically typed superset of JavaScript that compiles to plain JavaScript.

In other words, it’s JavaScript that scales.


_ Psst: if you’re interested in CSS that scales, read this post._

But to truly understand what it means, we first have to backpedal into the evolution of JavaScript. Actually, we have to remember what JS was intended for.

JS started as the language of the browsers, at a time where they were not that powerful. Being a dynamic language—with no “type” system—its aim wasn’t to build large-scale apps.

In the last five to six years though, JavaScript has exploded. It’s used everywhere: from 100-1000000 code lines programs. The problem is, it doesn’t have the scaling abilities of more mature language like C## or Java.

#machine learning #typescript #benefits #resources

Should You Learn TypeScript? (Hint: You Probably Should)
1.25 GEEK