Visual Studio tsconfig问题

时间:2017-10-20 18:53:49

标签: c# visual-studio-2017 tsconfig

我刚刚升级到 Visual Studio Community 2017 。我有一个在VS2015中启动的现有项目。

我收到以下错误:

  

已针对以下内容禁用JavaScript语言服务   project(s):XXXX \ tsconfig。点击了解更多信息。

我已使用以下代码将tsconfig.json文件添加到项目中:

{
"compilerOptions": {
    "allowJs": true,            // These settings apply to .js files as well as .ts files
        "noEmit":  true             // Do not compile the JS (or TS) files in this project on build
},
"exclude": [
    "node_modules",             // Don't include any JavaScript found under "node_modules"
    "Scripts/Office/1"          // Suppress loading all the .js files from the Office NuGet package
],


"typeAcquisition": {
    "enable": true, // Enable automatic fetching of type definitions for .js libraries
    "include": [ "office-js" ] // Ensure the "Office-js" type definition is fetched
  }
}

如何摆脱这个错误。

0 个答案:

没有答案