22 lines
405 B
TypeScript
22 lines
405 B
TypeScript
//// [iteratorSpreadInArray8.ts]
|
|
var array = [...new SymbolIterator];
|
|
|
|
class SymbolIterator {
|
|
next() {
|
|
return {
|
|
value: Symbol(),
|
|
done: false
|
|
};
|
|
}
|
|
}
|
|
|
|
//// [iteratorSpreadInArray8.js]
|
|
var array = [...new SymbolIterator];
|
|
class SymbolIterator {
|
|
next() {
|
|
return {
|
|
value: Symbol(),
|
|
done: false
|
|
};
|
|
}
|
|
}
|