我在指令中有一张显示错误代码的地图TS2488 Type 'HTML Collection' must have a '[Symbol.iterator]()' method that returns an iterator
。
我的地图:
map(
([headRow, bodyRows]: [HTMLTableRowElement, HTMLCollectionOf<HTMLTableRowElement>]) => [
[...headRow.children].map(headerCell => headerCell.textContent), // First issue
[...bodyRows].map(row => [...row.children]) // Second issue
]
),
我如何最好地处理这个问题?有什么建议给我吗?