swc/crates/swc_ecma_parser/tests/tsc/for-of14.ts

9 lines
182 B
TypeScript

//@target: ES6
class StringIterator {
next() {
return "";
}
}
var v: string;
for (v of new StringIterator) { } // Should fail because the iterator is not iterable