Languages
[Edit]
EN

TypeScript - upgrade TypeScript compiler (global tsc upgrade)

9 points
Created by:
nickkk0
647

In this short article, we would like to show how to upgrade TypeScript compiler.

Quick solution:

npm -g upgrade typescript

or upgrade to the latest major version:

npm -g install typescript

 

Hints:

  • install run on installed package causes package upgrade to latest major version,
  • use sudo under Linux, e.g.
    sudo npm -g upgrade typescript
    sudo npm -g install typescript

 

Detailed description

Open a terminal and do the following steps (in some cases as rootsuperuser or administrator):

  1. Check TypeScript version with the command:
    tsc -v
     
  2. Run upgrade with the command:
    npm -g upgrade typescript
    under Linux use:
    sudo npm -g upgrade typescript
    where: -g means global installation mode
     
  3. Check TypeScript version again:
    tsc -v

 

Note: the presented steps work on different platforms (Windows, Linux, etc.).

Practical example:

$ tsc -v
Version 3.3.3333

$ npm -g upgrade typescript
C:\Users\john\AppData\Roaming\npm\tsc -> C:\Users\john\AppData\Roaming\npm\node_modules\typescript\bin\tsc
C:\Users\john\AppData\Roaming\npm\tsserver -> C:\Users\john\AppData\Roaming\npm\node_modules\typescript\bin\tsserver
+ typescript@3.9.6
updated 1 package in 13.424s

$ tsc -v
Version 3.9.6

 

Alternative titles

  1. TypeScript - update TypeScript compiler (global tsc update)
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

TypeScript

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join