Languages
[Edit]
EN

TypeScript - upgrade TypeScript compiler (tsc upgrade)

4 points
Created by:
Marcin
19490

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

Quick solution:

npm -g upgrade typescript

or upgrade by latest version installation:

npm -g install typescript

Notes:

  • install affects jumping to latest version,
  • use sudo under Linux, e.g.
    sudo npm -g upgrade typescript
    sudo npm -g install typescript

Detailed description

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

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

Note: presented stemps 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

 

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