How to install TypeScript on windows?
Steps to install TypeScript environment in Windows are given below.
- First, download the latest version of TypeScript from its official website.
- We can install TypeScript using Node.js, Visual Studio, or other supported editors, but the first two are the most common way to install it.
- Download and run the .msi installer for Node support.
- Then, we will use npm to install TypeScript using Node.js. Just running the below-mentioned command in the Windows command will install the latest version.
npm install -g typescript
- We can check the version of TypeScript by running the following command in the terminal.
tsc -v
- To get help for other options here, use the following command
tsc -h
- To install TypeScript using Visual Studio, download Visual Studio Code, and launch it.
- Now by right clicking on the file → open in the command prompt, users may traverse to the file’s path.
- Now, creating a TypeScript file is possible just by adding a new file with a .ts extension. All the features of TypeScript will be available out of the box
BY Best Interview Question ON 09 Jun 2019