TypeScript/tests/baselines/reference/iteratorSpreadInCall4.js

32 lines
568 B
TypeScript
Raw Normal View History

2015-03-25 00:52:00 +01:00
//// [iteratorSpreadInCall4.ts]
foo(...new SymbolIterator);
function foo(s1: symbol, ...s: symbol[]) { }
class SymbolIterator {
next() {
return {
value: Symbol(),
done: false
};
}
[Symbol.iterator]() {
return this;
}
}
//// [iteratorSpreadInCall4.js]
foo(...new SymbolIterator);
function foo(s1, ...s) { }
2015-03-25 00:52:00 +01:00
class SymbolIterator {
next() {
return {
value: Symbol(),
done: false
};
}
[Symbol.iterator]() {
return this;
}
}