Angular 2.4.4, TypeScript 2.1.5, PhpStorm 2017.2.1 I am writing this code:
const list = document.querySelectorAll('path.frame-zone');
list.forEach(() => {
But the second line is underlined with a red line, and TsLint reports that "the forEach property does not exist in the NodeListOf type" But when I press Ctrl + click forEach
, it returns me to lib.es6.d.ts
where it is forEach
declared forinterface NodeListOf<TNode extends Node>
Why won't it let me use it? What's wrong?
source
share