38 lines
864 B
Text
38 lines
864 B
Text
=== tests/cases/conformance/es6/spread/iteratorSpreadInArray.ts ===
|
|
var array = [...new SymbolIterator];
|
|
>array : symbol[]
|
|
>[...new SymbolIterator] : symbol[]
|
|
>...new SymbolIterator : symbol
|
|
>new SymbolIterator : SymbolIterator
|
|
>SymbolIterator : typeof SymbolIterator
|
|
|
|
class SymbolIterator {
|
|
>SymbolIterator : SymbolIterator
|
|
|
|
next() {
|
|
>next : () => { value: symbol; done: boolean; }
|
|
|
|
return {
|
|
>{ value: Symbol(), done: false } : { value: symbol; done: boolean; }
|
|
|
|
value: Symbol(),
|
|
>value : symbol
|
|
>Symbol() : symbol
|
|
>Symbol : SymbolConstructor
|
|
|
|
done: false
|
|
>done : boolean
|
|
>false : boolean
|
|
|
|
};
|
|
}
|
|
|
|
[Symbol.iterator]() {
|
|
>Symbol.iterator : symbol
|
|
>Symbol : SymbolConstructor
|
|
>iterator : symbol
|
|
|
|
return this;
|
|
>this : SymbolIterator
|
|
}
|
|
}
|