TypeScript/tests/baselines/reference/for-of14.errors.txt
2015-03-25 18:03:28 -07:00

14 lines
562 B
Plaintext

tests/cases/conformance/es6/for-ofStatements/for-of14.ts(2,11): error TS2488: Type must have a '[Symbol.iterator]()' method that returns an iterator.
==== tests/cases/conformance/es6/for-ofStatements/for-of14.ts (1 errors) ====
var v: string;
for (v of new StringIterator) { } // Should fail because the iterator is not iterable
~~~~~~~~~~~~~~~~~~
!!! error TS2488: Type must have a '[Symbol.iterator]()' method that returns an iterator.
class StringIterator {
next() {
return "";
}
}