TypeScript/tests/baselines/reference/for-of18.types

38 lines
782 B
Plaintext
Raw Normal View History

2015-02-24 04:07:45 +01:00
=== tests/cases/conformance/es6/for-ofStatements/for-of18.ts ===
var v: string;
>v : string
2015-02-24 04:07:45 +01:00
for (v of new StringIterator) { } // Should succeed
>v : string
2015-02-24 04:07:45 +01:00
>new StringIterator : StringIterator
>StringIterator : typeof StringIterator
2015-02-24 04:07:45 +01:00
class StringIterator {
>StringIterator : StringIterator
2015-02-24 04:07:45 +01:00
next() {
>next : () => { value: string; done: boolean; }
2015-02-24 04:07:45 +01:00
return {
>{ value: "", done: false } : { value: string; done: boolean; }
value: "",
>value : string
2015-04-13 21:36:11 +02:00
>"" : string
2015-02-24 04:07:45 +01:00
done: false
>done : boolean
2015-04-13 21:36:11 +02:00
>false : boolean
2015-02-24 04:07:45 +01:00
};
}
[Symbol.iterator]() {
>Symbol.iterator : symbol
>Symbol : SymbolConstructor
>iterator : symbol
2015-02-24 04:07:45 +01:00
return this;
>this : StringIterator
2015-02-24 04:07:45 +01:00
}
}