角2.4.4,2.1.5打字稿,PhpStorm 2017年2月1日 我写这篇文章的代码的forEach上不存在类型:财产NodeListOf
const list = document.querySelectorAll('path.frame-zone');
list.forEach(() => {
但第二行强调用红色线及TsLint报道说 “属性的forEach不上型NodeListOf存在”但是,当我按Ctrl +单击它让我的forEach
到lib.es6.d.ts
其中forEach
声明为interface NodeListOf<TNode extends Node>
为什么它不会让我使用它呢?哪里不对?
您正在使用什么LIB?是es6还是使用旧版本? –
在这种情况下lib是什么?我正在维护另一个团队的旧项目。也许有些配置错误,但不知道在哪里看。您的tsconfig.json中的 – Gherman
。你的项目使用什么库? –