21 lines
No EOL
707 B
Text
21 lines
No EOL
707 B
Text
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;
|
|
}
|
|
} |