Iva*_*n L 5 typescript grunt-ts visual-studio-2015 asp.net-core
我创建了一个ASP.NET 5项目,主要用于前端打字脚本应用程序.
我正在使用grunt和grunt-ts来编译.
我有一个'src'文件夹,其中包含我的所有打字稿文件
grunt-ts编译'src'文件夹中的所有内容,并将其与单个js文件组合,然后将其放入wwwroot文件夹中.还会生成一个打字稿定义文件并将其放在wwwroot文件夹中.
用grunt/grunt-ts编译完美无瑕.
问题:当定义文件存在于wwwroot文件夹中时,visual studio IDE开始给我很多"重复标识符"错误.这当然是因为定义文件.
有没有办法让visual studio忽略它的IDE /内部打字稿编译的wwwroot文件夹(或任何文件夹)?
您想要将一个tsconfig.json文件添加到项目的根目录,其中包含以下内容:
{
"compilerOptions": {
"noImplicitAny": true,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": false,
"module": "commonjs",
"target": "es5"
},
"exclude": [
"bower_components",
"node_modules",
"wwwroot"
]
}
Run Code Online (Sandbox Code Playgroud)
tsconfig.json文件负责配置 TypeScript 编译。
| 归档时间: |
|
| 查看次数: |
1599 次 |
| 最近记录: |