How to install TypeScript
Hey guys you must have read my TypeScript post and if not i recommend it first.
Now if you have finished with reading i am here to assist you to set up your TypeScript developer environment.
There are many ways you can install TypeScript but here we will discuss installing via npm as this is the easiest way to install TypeScript according to me. Without creating a further delay lets lets get started.
Via npm :-
Typescript is available in npm (node package manager) resistery as a package name as "typescript".
We will be installing TypeScript globally so you can use the "tsc" command anywhere in your terminal.
Here are the steps to install TypeScript
1. Firstly you have to install "node.js" in your system from their official website.
Note:- Choose a compatable version with your system.
2. After downloading node install it your system.
Note:- Do not change any defaults if you don't know what are you doing
3. Now you have installed node in your system. Its time to check weather you have installed it correctly or not. To check it open up power shell and type [ node -v] and hit enter. If you get the version of the node installed then you are on right track.
4. Now moving further type the command [ npm install -g typescript ] and hit enter this will start installing TypeScript.
5. After installing to verify the successful installation of TypeScript. Open up the power shell and write the command [ tsc -v] this will return the Typescript version you have installed then congratulations you have installed TypeScript in your computer.