简体   繁体   English

TypeScript定义文件上的编译错误

[英]Compilation errors on the TypeScript Definition Files

I'm going to convert my *.js files into *.ts on my ASP.net MVC5 app (Not an Asp.net Core app). 我要在我的ASP.net MVC5应用程序(不是Asp.net核心应用程序)上将我的*.js文件转换为*.ts I'm using VS 2015.I have downloaded the TypeScript Definition Files into Scripts\\typings\\ folder.Now when I compile the project it gives 100+ errors on *.d.ts files.Can you tell me how to get rid of these errors ? 我正在使用VS 2015.I已将TypeScript定义文件下载到Scripts\\typings\\ typings Scripts\\typings\\ folder.Now当我编译项目时,它在*.d.ts上提供了100多个错误。你能告诉我如何摆脱这些错误?

Errors are like this : 错误是这样的:

在此输入图像描述

I have added tsconfig.jason to the Scripts folder and now no errors :) 我已将tsconfig.jason添加到Scripts文件夹中,现在没有错误:)

tsconfig.jason tsconfig.jason

 {
  "compilerOptions": {
    "noImplicitAny": false,
    "noEmitOnError": true,
    "removeComments": false,
    "sourceMap": true,
    "target": "es5"
  },
  "exclude": [
    "node_modules",
    "typings/angularjs",
    "typings/jquery"
  ]
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM