TypeScript/tests/baselines/reference/for-of15.types
Andy a299d2dd1c
isDeclarationName: support ComputedPropertyName (#22123)
* isDeclarationName: support ComputedPropertyName

* update additional baseline
2018-02-22 15:53:49 -08:00

30 lines
562 B
Plaintext

=== tests/cases/conformance/es6/for-ofStatements/for-of15.ts ===
class StringIterator {
>StringIterator : StringIterator
next() {
>next : () => string
return "";
>"" : ""
}
[Symbol.iterator]() {
>[Symbol.iterator] : () => this
>Symbol.iterator : symbol
>Symbol : SymbolConstructor
>iterator : symbol
return this;
>this : this
}
}
var v: string;
>v : string
for (v of new StringIterator) { } // Should fail
>v : string
>new StringIterator : StringIterator
>StringIterator : typeof StringIterator