Intellisense 不使用项目打字稿版本

Intellisense not using project typescript version

有没有办法确定 VS2017 中使用的 TypeScript IntelliSense 版本? 我们有一个使用 TypeScript 2.1 的 Web 项目(在项目属性中)并且具有以下 tsconfig.json 文件:

{
  "typeAcquisition": {
    "enable": false
  },
  "compileOnSave": true,
  "compilerOptions": {
    "noImplicitAny": false,
    "noEmitOnError": true,
    "removeComments": false,
    "sourceMap": true,
    "target": "es5"
  },
  "include": [
    "ScriptsApp",
    "Scripts",
    "ScriptsModels"
  ]
}

我们可以获得编译 TypeScript 文件的解决方案,不会出现错误或警告,但我们总是会出现 Intellisense 错误。

在构建日志中我可以看到 msbuild 使用的是 2.1 版本。 如果我将版本更改为 TypeScript 2.6,我会在 build en IntelliSence 中遇到相同的错误。所以看起来 IntelliSence 使用的是 TypeScript 2.6。

有没有办法设置 IntelliSense TypeScript 版本?

我 Visual Studio 2017 (15.4.4) 安装了 Typescript 2.1、2.2、2.3 和 2.6。

此问题已在 VS 15 中解决。5.x。 参见:https://github.com/Microsoft/TypeScript/issues/20438