TypeScript/tests/baselines/reference/for-of15.errors.txt

17 lines
621 B
Plaintext
Raw Normal View History

2015-03-02 01:45:14 +01:00
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.
2015-02-24 04:07:45 +01:00
==== tests/cases/conformance/es6/for-ofStatements/for-of15.ts (1 errors) ====
var v: string;
for (v of new StringIterator) { } // Should fail
~~~~~~~~~~~~~~~~~~
2015-03-02 01:45:14 +01:00
!!! error TS2490: The type returned by the 'next()' method of an iterator must have a 'value' property.
2015-02-24 04:07:45 +01:00
class StringIterator {
next() {
return "";
}
[Symbol.iterator]() {
return this;
}
}