How to install typescript

How to install typescript

  1. Globally Installing TypeScript

    You can use npm to install TypeScript globally, this means that you can use the tsc command anywhere in your terminal

    npm install -g typescript

To run typescript npx tsc

  1. Check Typescript version

    tsc -v

  2. You might get Error

You can run this command in PowerShell. Make sure to run it as an administrator

// run Powershell as Administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

Now you can Check, your typescript version

tsc -v