mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
27 lines
455 B
TypeScript
27 lines
455 B
TypeScript
//// [tests/cases/conformance/es6/for-ofStatements/for-of34.ts] ////
|
|
|
|
//// [for-of34.ts]
|
|
class MyStringIterator {
|
|
next() {
|
|
return v;
|
|
}
|
|
|
|
[Symbol.iterator]() {
|
|
return this;
|
|
}
|
|
}
|
|
|
|
for (var v of new MyStringIterator) { }
|
|
|
|
//// [for-of34.js]
|
|
"use strict";
|
|
class MyStringIterator {
|
|
next() {
|
|
return v;
|
|
}
|
|
[Symbol.iterator]() {
|
|
return this;
|
|
}
|
|
}
|
|
for (var v of new MyStringIterator) { }
|