[英]Intellisense not using project typescript version
Is there a way to determine what version of TypeScript IntelliSense is using in VS2017? 有没有一种方法可以确定VS2017中使用的TypeScript IntelliSense版本? We have a web project that is using TypeScript 2.1 (in project properties) and has the following tsconfig.json file:
我们有一个使用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"
]
}
We can get the solution to compile the TypeScript files without error or warning, but we always get Intellisense errors. 我们可以得到在没有错误或警告的情况下编译TypeScript文件的解决方案,但是我们总是会遇到Intellisense错误。
In the build log I can see msbuild is using the 2.1 version. 在生成日志中,我可以看到msbuild正在使用2.1版本。 If I change the version to TypeScript 2.6, I get the same errors in build en IntelliSence.
如果将版本更改为TypeScript 2.6,则在Build IntelliSence中会出现相同的错误。 So it looks like IntelliSence is using TypeScript 2.6.
因此,看起来IntelliSence使用的是TypeScript 2.6。
Is there a way to set the IntelliSense TypeScript version? 有没有办法设置IntelliSense TypeScript版本?
I have Visual Studio 2017 (15.4.4) installed with Typescript 2.1, 2.2, 2.3 and 2.6. 我已经安装了带有Typescript 2.1、2.2、2.3和2.6的Visual Studio 2017(15.4.4)。
The issue was resolved in VS 15.5.x. 在VS 15.5.x中已解决了该问题。 See: https://github.com/Microsoft/TypeScript/issues/20438
参见: https : //github.com/Microsoft/TypeScript/issues/20438
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.