Installing TypeScript

To install TypeScript, follow the next steps:

  1. Click Start | All Programs | Windows System | Command Prompt
  2. Write the following command and press Enter:
npm install typescript -g
  1. This will start the TypeScript installation
  2. After a few seconds, the installation will end, and TypeScript will be installed on your machine
  3. To test whether or not TypeScript is installed correctly, write the following command into Command Prompt and press Enter:
tsc --version 

 If the installed version is displayed, then TypeScript has been installed correctly

If you receive an error, try to close and reopen Command Prompt and try again. If that doesn't work, try to go through the preceding steps again to reinstall TypeScript.

Get Hands-On Full-Stack Web Development with ASP.NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.