So i did ng -v
it shows me everything except typescript, so how can i check Typescript version of my angular 4 project.
Go to: C:\Program Files (x86)\Microsoft SDKs\TypeScript, there you see directories of type 0.9, 1.0 1.1. Enter the high number that you have (in this case 1.1) Copy the directory and run in CMD the command tsc -v, you get the version.
Angular now uses TypeScript 3.4.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With