mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
21 lines
619 B
Plaintext
21 lines
619 B
Plaintext
iteratorSpreadInCall.ts(15,5): error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter.
|
|
|
|
|
|
==== iteratorSpreadInCall.ts (1 errors) ====
|
|
function foo(s: symbol) { }
|
|
class SymbolIterator {
|
|
next() {
|
|
return {
|
|
value: Symbol(),
|
|
done: false
|
|
};
|
|
}
|
|
|
|
[Symbol.iterator]() {
|
|
return this;
|
|
}
|
|
}
|
|
|
|
foo(...new SymbolIterator);
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2556: A spread argument must either have a tuple type or be passed to a rest parameter. |