mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 04:01:39 +03:00
12 lines
183 B
TypeScript
12 lines
183 B
TypeScript
|
//@target: ES6
|
|||
|
class StringIterator {
|
|||
|
next() {
|
|||
|
return x;
|
|||
|
}
|
|||
|
[Symbol.iterator]() {
|
|||
|
return this;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
var x: any;
|
|||
|
for (var v of new StringIterator) { }
|