toPromise和WebStorm的输入错误

时间:2016-09-29 06:26:37

标签: angular typescript webstorm typescript-typings

WebStorm似乎没有认识到'rxjs'上toPromise函数的输入。这是我能解决的问题吗?我已经更新了它。

然而,当我运行代码时它确实有效。这很奇怪。

enter image description here

1 个答案:

答案 0 :(得分:0)

好的,最后让这个工作了。我的过程是

  1. 删除npm globals文件夹@'usr / local / lib / node_modules'
  2. 重新安装节点和npm
  3. 删除所有本地node_modules
  4. npm cache clear
  5. 重新启动webstorm
  6. 现在它神奇地拿起了def类型。我会说通常我只需要尽可能地清理掉并重新进行重建。