I cannot get Visual Studio Code to update the version of typescript it is running.
I have read the answer to this question in detail.
I have tried setting my user settings to:
{
"typescript.tsdk": "C:\\Users\\myUser\\AppData\\Roaming\\npm\\node_modules\\typescript\\lib"
}
This did not help.
I have also tried setting my workspace setting to:
{
"typescript.tsdk": "./node_modules/typescript/lib"
}
This also seemed to have no effect.
I configured my task runner to run tasks.json and have it set to the following:
{
"version": "0.1.0",
"command": "tsc",
"args": ["-v"],
"echoCommand": true
}
This will call tsc with the -v command (to output the version).
When I press ctrl+shift+B the output reads
running command> tsc -v
Version 1.8.34
Is there something else I need to do to get Visual Studio Code to update its version of Typescript?
NOTE: I went to both of the paths I tried above and did a tsc -v in the bin folder and both returned 2.1.4
NOTE II: I have tried restarting Visual Studio Code several times.
NOTE III: When I run tsc -v from a command prompt from C: it outputs 2.1.4
I am running Visual Studio Code 1.8.1
Update:
I changed my tasks.json to run where tsc and this was the output:
running command> where tsc
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.exe
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.js
C:\Users\myUser\AppData\Roaming\npm\tsc
C:\Users\myUser\AppData\Roaming\npm\tsc.cmd
So I can see where it is getting the older version of typescript from, but I don't understand WHY it is not using the "overridden" version.
My only guess is that the override is not for building. It is only for intelisense and such. Still, I need a way to change this...