TypeScript/tests/baselines/reference/for-of15.errors.txt
2015-03-01 17:07:43 -08:00

17 lines
621 B
Plaintext

tests/cases/conformance/es6/for-ofStatements/for-of15.ts(2,11): error TS2490: The type returned by the 'next()' method of an iterator must have a 'value' property.
==== tests/cases/conformance/es6/for-ofStatements/for-of15.ts (1 errors) ====
var v: string;
for (v of new StringIterator) { } // Should fail
~~~~~~~~~~~~~~~~~~
!!! error TS2490: The type returned by the 'next()' method of an iterator must have a 'value' property.
class StringIterator {
next() {
return "";
}
[Symbol.iterator]() {
return this;
}
}