Install new version of TypeScript
In this article we are going to focus on how to install a new version of TypeScript using tsc -v command if there is already an older version of typescript installed on your computer due to Visual Studio installation.
In this article we are going to focus on how to install a new version of TypeScript if there is already an older version of typescript installed on your computer due to Visual Studio installation.
Open the command prompt and type tsc -v and then you will find the version of type script installed on your computer. I had version 1.0.3.0 installed and I would like to install the latest version of TypeScript.
Go to the environment variables on your computer and open the Path environment variable. Now remove the Type script path "C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;".
Delete the TypeScript folder from the "C:\Program Files (x86)\Microsoft SDKs" path. I saved this folder to another location on my computer just to ensure that if the new command does not work I can restore it back.
Now go to command prompt and type the following command:
npm install -g typescript
This will install the latest version of the TypeScript on your computer and you can confirm it using tsc -v command which displays the message as shown in the screenshot below.
Voila!! you now have a latest version of TypeScript installed.