mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
35 lines
642 B
TypeScript
35 lines
642 B
TypeScript
//// [tests/cases/conformance/es6/spread/iteratorSpreadInCall3.ts] ////
|
|
|
|
//// [iteratorSpreadInCall3.ts]
|
|
function foo(...s: symbol[]) { }
|
|
class SymbolIterator {
|
|
next() {
|
|
return {
|
|
value: Symbol(),
|
|
done: false
|
|
};
|
|
}
|
|
|
|
[Symbol.iterator]() {
|
|
return this;
|
|
}
|
|
}
|
|
|
|
foo(...new SymbolIterator);
|
|
|
|
//// [iteratorSpreadInCall3.js]
|
|
"use strict";
|
|
function foo(...s) { }
|
|
class SymbolIterator {
|
|
next() {
|
|
return {
|
|
value: Symbol(),
|
|
done: false
|
|
};
|
|
}
|
|
[Symbol.iterator]() {
|
|
return this;
|
|
}
|
|
}
|
|
foo(...new SymbolIterator);
|