TypeScript/tests/baselines/reference/for-of17.errors.txt
2015-02-26 18:17:21 -08:00

20 lines
599 B
Plaintext

tests/cases/conformance/es6/for-ofStatements/for-of17.ts(2,6): error TS2322: Type 'number' is not assignable to type 'string'.
==== tests/cases/conformance/es6/for-ofStatements/for-of17.ts (1 errors) ====
var v: string;
for (v of new NumberIterator) { } // Should succeed
~
!!! error TS2322: Type 'number' is not assignable to type 'string'.
class NumberIterator {
next() {
return {
value: 0,
done: false
};
}
[Symbol.iterator]() {
return this;
}
}