TypeScript/tests/baselines/reference/for-of14.js

19 lines
371 B
TypeScript

//// [for-of14.ts]
var v: string;
for (v of new StringIterator) { } // Should fail because the iterator is not iterable
class StringIterator {
next() {
return "";
}
}
//// [for-of14.js]
var v;
for (v of new StringIterator) { } // Should fail because the iterator is not iterable
class StringIterator {
next() {
return "";
}
}