1.2. Setting up your TypeScript development environment
In order to use npm we must first download and install Node.js from https://nodejs.org/en/download/.
How to do it…
- Once you have installed Node.js, you should be able to check if the installation was successfully by executing the following command on the console:
$ node -v
At the time of writing this book the Node.js version was
v7.10.0. Please note that if you use a different version some of the contents of this book may need to be changed accordingly.
- If everything went well, we should be able to install the TypeScript npm package using the npm command line interface:
$ npm install -g typescript
- Once you have installed it, you should be able to check if the installation was successfully by executing the following command on the console:
$ tsc -v
At the time of writing this book the version of the TypeScript npm package was
2.3.3. Please note that if you use a different version some of the contents of this book may need to be changed accordingly.