Files
tsgo/testdata/baselines/reference/submodule/conformance/for-of21.js

39 lines
611 B
TypeScript

//// [tests/cases/conformance/es6/for-ofStatements/for-of21.ts] ////
//// [for-of21.ts]
class Foo { }
class FooIterator {
next() {
return {
value: new Foo,
done: false
};
}
[Symbol.iterator]() {
return this;
}
}
for (const v of new FooIterator) {
v;
}
//// [for-of21.js]
"use strict";
class Foo {
}
class FooIterator {
next() {
return {
value: new Foo,
done: false
};
}
[Symbol.iterator]() {
return this;
}
}
for (const v of new FooIterator) {
v;
}