To update Typescript, use the following command:
npm install typescript -g
I have successfully installed the latest version 2.4.2 and confirmed it by checking the path with this command:
npm list typescript -g
However, when I check the version using tsc -v
, it shows an older version (1.0.3.0).
I also checked the TEMP variable and it is pointing to the same path as shown in npm list
.
Running where tsc
in the command prompt does not display anything and does not result in any errors.