Requirement: Ensure that when TypeScript files are opened in VSCode, the version of TypeScript used should be from node_modules
rather than the default one provided by VSCode.
To achieve this, I updated the settings in the .vscode/settings.json
file with the following code snippet as per the instructions outlined in the official documentation:
{
"typescript.tsdk": "./node_modules/typescript/lib"
}
Despite making this change, VSCode continues to use its default TypeScript version. The problem has been replicated and documented in the vscode-typescript-default-version repository.
What steps should be taken to ensure that the TypeScript version from node_modules
is used automatically when TypeScript files are opened in VSCode?
Trivikram