21 lines
707 B
Plaintext
21 lines
707 B
Plaintext
tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts(2,14): error TS2345: Argument of type 'symbol[]' is not assignable to parameter of type 'number'.
|
|
|
|
|
|
==== tests/cases/conformance/es6/spread/iteratorSpreadInArray6.ts (1 errors) ====
|
|
var array: number[] = [0, 1];
|
|
array.concat([...new SymbolIterator]);
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2345: Argument of type 'symbol[]' is not assignable to parameter of type 'number'.
|
|
|
|
class SymbolIterator {
|
|
next() {
|
|
return {
|
|
value: Symbol(),
|
|
done: false
|
|
};
|
|
}
|
|
|
|
[Symbol.iterator]() {
|
|
return this;
|
|
}
|
|
} |