Typescript: ошибка: for..of Π½Π΅ Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚ с NodeList

Π‘ΠΎΠ·Π΄Π°Π½Π½Ρ‹ΠΉ Π½Π° 4 нояб. 2016  Β·  1ΠšΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ  Β·  Π˜ΡΡ‚ΠΎΡ‡Π½ΠΈΠΊ: microsoft/TypeScript



ВСрсия TypeScript: nightly (2.1.0-dev.201xxxxx)

Код

// A *self-contained* demonstration of the problem follows...
for(const a of document.querySelectorAll('div')) {}

ОТидаСмоС повСдСниС:
Он Π΄ΠΎΠ»ΠΆΠ΅Π½ ΡΠΊΠΎΠΌΠΏΠΈΠ»ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒΡΡ.

ЀактичСскоС ΠΏΠΎΠ²Π΅Π΄Π΅Π½ΠΈΠ΅:
error TS2495: Type 'NodeListOf<Element>' is not an array type or a string type

Π‘Π°ΠΌΡ‹ΠΉ ΠΏΠΎΠ»Π΅Π·Π½Ρ‹ΠΉ ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ

image

>ВсС замСчания

image

Π‘Ρ‹Π»Π° Π»ΠΈ эта страница ΠΏΠΎΠ»Π΅Π·Π½ΠΎΠΉ?
0 / 5 - 0 Ρ€Π΅ΠΉΡ‚ΠΈΠ½Π³ΠΈ