尽管我的Angular2 TypeScript项目正常工作,WebStorm仍然以红色突出显示变量和函数

时间:2016-08-24 09:41:09

标签: intellij-idea angular typescript webstorm

当我在WebStorm中打开项目时,一切看起来都很好。每当我双击任何.ts文件时,它立即被标记为红色,表示存在问题。尽管如此,项目工作正常,代码正在正确执行等。

作为参考,这不是项目特定的问题,因为我的一个朋友使用完全相同的代码,没有IDE指示的错误。

例如,我们来看看这个回购https://github.com/AngularClass/angular2-webpack-starter。浏览项目时,我得到的错误如

  

未解决的变量数据

enter image description here

  

未解决的函数或方法require()

enter image description here

我的@Component注释在项目中出现Invalid number of arguments, expected 0时出现错误: enter image description here

我有npm版本3.9.5,节点版本6.2.2和WebStorm版本2016.2.1。我做了npm installbower install

0 个答案:

没有答案