Conflicts: src/compiler/checker.ts tests/baselines/reference/constDeclarations-errors.errors.txt
41 lines
735 B
JavaScript
41 lines
735 B
JavaScript
//// [for-of21.ts]
|
|
for (const v of new FooIterator) {
|
|
v;
|
|
}
|
|
|
|
class Foo { }
|
|
class FooIterator {
|
|
next() {
|
|
return {
|
|
value: new Foo,
|
|
done: false
|
|
};
|
|
}
|
|
[Symbol.iterator]() {
|
|
return this;
|
|
}
|
|
}
|
|
|
|
//// [for-of21.js]
|
|
for (const v of new FooIterator) {
|
|
v;
|
|
}
|
|
var Foo = (function () {
|
|
function Foo() {
|
|
}
|
|
return Foo;
|
|
})();
|
|
var FooIterator = (function () {
|
|
function FooIterator() {
|
|
}
|
|
FooIterator.prototype.next = function () {
|
|
return {
|
|
value: new Foo,
|
|
done: false
|
|
};
|
|
};
|
|
FooIterator.prototype[Symbol.iterator] = function () {
|
|
return this;
|
|
};
|
|
return FooIterator;
|
|
})();
|