I'm having trouble updating the version of TypeScript that Visual Studio Code is running.
After carefully reading through the response to this question, I attempted to modify my user settings using:
{
"typescript.tsdk": "C:\\Users\\myUser\\AppData\\Roaming\\npm\\node_modules\\typescript\\lib"
}
Unfortunately, this didn't resolve the issue. Additionally, I experimented with adjusting my workspace settings as follows:
{
"typescript.tsdk": "./node_modules/typescript/lib"
}
However, this adjustment also seemed ineffective. When configuring my task runner to execute tasks.json, I specified the following parameters:
{
"version": "0.1.0",
"command": "tsc",
"args": ["-v"],
"echoCommand": true
}
Despite these efforts, pressing ctrl+shift+B displayed the output:
running command> tsc -v
Version 1.8.34
I'm unsure if there are additional steps required to update Typescript within Visual Studio Code. Any suggestions or recommendations would be greatly appreciated.
Note: Running tsc -v in both paths mentioned above returned 2.1.4.
Note II: I've attempted restarting Visual Studio Code multiple times to no avail.
Note III: Executing tsc -v from a command prompt under C: yielded a result of 2.1.4.
My current Visual Studio Code version is 1.8.1
Update:
In an effort to pinpoint the source of the outdated TypeScript version, I revised my tasks.json file to run where tsc. The resulting output was:
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
Identifying the location of the older TypeScript version shed light on the issue, but it remains unclear why the "overridden" version isn't being utilized.
It's possible that the override solely impacts features like intellisense rather than building processes. However, I am eager to find a solution to this dilemma.