TypeScript compiler is developed in NodeJS, so we need first install it. Let’s start with NodeJS

First of all, go to official NodeJS Web and download installing packages according with your Operating System.

Then, we can install TSC, compiler TypeScript to JavaScript. We can do it in two different ways:

  • Using npm:
> npm install -g typescript
  • Or if you use Visual Studio Code, you can add the plugin.

Once we have installed, it could be checked running:

> tcs -v

Now we are ready to use TypeScript in our system, all we need is create new file with “.ts”…


TypeScript is a free and open source programming language development by Microsoft in 2012. It is based on JavaScript, so you should know something about JavaScript before you work with TypeScript.

It can generate JavaScript code, so any JavaScript code could work without problems. We can say that it is a transpiler or pre-compiler, because it does compiler and instruction translate functions. It means that it translate Typescript code into JavaScript, with the option of select the version that you need: ES5 or ES6.

Also, it could work with important JavaScript packages: jQuery, MongoDB, Node.js and D3.js.

TypeScript vs JavaScript

We can find…

Julia López Sánchez

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store