How to know which typescript version running on angular 4 project

Open package.json file and check devDependencies node. It has typescript version used in project like below.

"typescript": "^2.4.0",

You can also use command prompt as Sajeetharan suggested in below answer.


If you want the exact version installed as a package dependency use the ls command:

npm ls typescript

Alternatively, you could run tsc with the -v flag:

If installed locally:

node_modules\.bin\tsc -v

If installed globally:

tsc -v

NOTE: If you plan on checking package.json for the version number, keep in mind the caret in ^2.4.0 means you could be getting 2.4.x, 2.5.x 2.6.x, etc. The ^ tells you the minor version will automatically be updated to the latest version upon a fresh install or an npm update.

If the version number is preceeded by ~ (i.e. ~2.4.0), then the patch number is automatically updated on a new install or update. That means any of the following versions could be installed: 2.4.0, 2.4.1, 2.4.2, etc, but not 2.5.x