I am trying to figure out what version of TypeScript I am using. In VS Code, if I run tsc -v in the terminal, it says I'm running 1.0.3.0. However, in VS Code's status bar, it says I'm running 2.2.2. Shouldn't these numbers be the same? Why the discrepancy?
Asked
Active
Viewed 539 times
1 Answers
4
VSCode includes its own bundled version of TypeScript, but is also able to use the version of TypeScript found in the local workspace. If you click the version of TypeScript at the bottom-right of VSCode, some options will pop up which let you select which version of TypeScript to use:
Additionally, you can configure VSCode to use a new global version of TypeScript by default. VSCode provides more info about all this in their documentation:
To use a different TypeScript version by default, configure
typescript.tsdk
in your user settings to point to a directory containing the TypeScripttsserver.js
file. You can find the TypeScript installation location usingnpm list -g typescript
. Thetsserver.js
file is usually in the lib folder.

JKillian
- 18,061
- 8
- 41
- 74