40 lines
925 B
Text
40 lines
925 B
Text
=== tests/cases/conformance/es6/spread/iteratorSpreadInArray4.ts ===
|
|
var array = [0, 1, ...new SymbolIterator];
|
|
>array : (number | symbol)[]
|
|
>[0, 1, ...new SymbolIterator] : (number | symbol)[]
|
|
>0 : number
|
|
>1 : number
|
|
>...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
|
|
}
|
|
}
|