44 lines
803 B
Plaintext
44 lines
803 B
Plaintext
=== tests/cases/conformance/es6/for-ofStatements/for-of19.ts ===
|
|
class Foo { }
|
|
>Foo : Foo
|
|
|
|
class FooIterator {
|
|
>FooIterator : FooIterator
|
|
|
|
next() {
|
|
>next : () => { value: Foo; done: boolean; }
|
|
|
|
return {
|
|
>{ value: new Foo, done: false } : { value: Foo; done: boolean; }
|
|
|
|
value: new Foo,
|
|
>value : Foo
|
|
>new Foo : Foo
|
|
>Foo : typeof Foo
|
|
|
|
done: false
|
|
>done : boolean
|
|
>false : false
|
|
|
|
};
|
|
}
|
|
[Symbol.iterator]() {
|
|
>[Symbol.iterator] : () => this
|
|
>Symbol.iterator : symbol
|
|
>Symbol : SymbolConstructor
|
|
>iterator : symbol
|
|
|
|
return this;
|
|
>this : this
|
|
}
|
|
}
|
|
|
|
for (var v of new FooIterator) {
|
|
>v : Foo
|
|
>new FooIterator : FooIterator
|
|
>FooIterator : typeof FooIterator
|
|
|
|
v;
|
|
>v : Foo
|
|
}
|