我已经看过很多关于此问题的帖子和讨论,但我无法解决这个问题。这是我前几天的帖子 https://stackoverflow.com/questions/36037962/how-to-get-rid-of-reference-path/36040269?noredirect=1#comment59753460_36040269.
目的之一是typings
是为了避免使用<reference>
标签,对吗?
但如果我不使用它,Visual Studio 就会抱怨:
一旦我引用,Visual Studio 就会停止抱怨browser.d.ts
.
这是我的tsconfig
:
{
"compilerOptions": {
"noImplicitAny": false,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"target": "es5"
},
"files": [
],
"exclude": [
"node_modules",
"wwwroot"
]
}
我也尝试删除"files"
财产来自tsconfig
按照建议here https://stackoverflow.com/questions/36037962/how-to-get-rid-of-reference-path/36040269?noredirect=1#comment59753460_36040269,但是如果我这样做,我会在typings的环境文件夹内的其他打字稿文件中收到编译错误。
代码运行并且一切正常,但我想了解我是否做错了什么或者是否是 Visual Studio 问题。