Should You Learn TypeScript?

If you’re reading this blog than there is a good chance that you are a web programmer of some level, and probably already know at least a bit about JavaScript. If those things are true than the short answer to the question in big bold letters up there is yes — lets talk about why.

First, what is typescript? Typescript is a language created and maintained by Microsoft, released in 2012 after a few year of being used internally. It sought out to fix some issues that were commonly appearing in JavaScript on large projects (which Microsoft has a fair amount of). At the end of the day the browsers cant understand TypeScript and it is compiled back to plain old JavaScript.

Wait a sec… if were taking TypeScript and turning into javascript anyway then why not just write the javascript in the first place? Well, TS can help catch a lot of bugs that normal javascript can’t and that comes mainly from one big upgrade that TS has over JS, which is static typing.

The short of it is that typescript allows variables to have a set type, for instance variable someVariable could be set to a type of string, and it would never be able to changed to another type, such as boolean. This can save a lot of headache down the road.

There are other benefits to TS, such as modules and better support for Object-Oriented Programming (typescript is actually referred to as an object oriented programming language, while javascript is referred to as a scripting language), but really I think the biggest reason that you should learn it is because its very similar to JS, and if you already know JS, TS will feel very familiar and easy to pick up.

TypeScript is a nice touch on a resume especially if you’re planning on working at a big company like Google or Microsoft because they are the companies that are using it the most! It’s easy to pick up and it comes with lots of benefits! Learn TypeScript and don’t look back!

Student at Flatiron School