Before we dive into TypeScript, we need to install the required tools and dependencies. In this tutorial, we will learn how to install TypeScript and set up our development environment. We will learn how to Install and run typescript in windows.
To run typescript, we need to install
- Typescript compiler
- Code Editor
Table of Contents
Installing Typescript
The Typescript is installed using the npm package manager or NPM. It is a default package manager for Node.js and is installed when the Node.js is installed.
You can download and install Node.js from downloading it from the official website https://nodejs.org/.
Once you install the Node, you can install the typescript compiler using the following command from the command prompt
1 2 3 | npm install -g typescript |
Installing Visual Studio Code
Next, we will need a Code editor. You have many choices here. For this tutorial, we will use Visual Studio Code.
You can download it from the official https://code.visualstudio.com/download
That’s it.
Summary
Installing Typescript compiler is as easy as installing an npm package. In the next tutorial, we will build a simple Hello World program to get started with TypeScript.
I use and recommend Codelobster IDE for TypeScript coding – http://www.codelobster.com/typescript.html