mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
34 lines
1.6 KiB
Plaintext
34 lines
1.6 KiB
Plaintext
iteratorSpreadInArray6.ts(15,14): error TS2769: No overload matches this call.
|
|
The last overload gave the following error.
|
|
Argument of type 'symbol[]' is not assignable to parameter of type 'number | ConcatArray<number>'.
|
|
Type 'symbol[]' is not assignable to type 'ConcatArray<number>'.
|
|
The types returned by 'slice(...)' are incompatible between these types.
|
|
Type 'symbol[]' is not assignable to type 'number[]'.
|
|
Type 'symbol' is not assignable to type 'number'.
|
|
|
|
|
|
==== iteratorSpreadInArray6.ts (1 errors) ====
|
|
class SymbolIterator {
|
|
next() {
|
|
return {
|
|
value: Symbol(),
|
|
done: false
|
|
};
|
|
}
|
|
|
|
[Symbol.iterator]() {
|
|
return this;
|
|
}
|
|
}
|
|
|
|
var array: number[] = [0, 1];
|
|
array.concat([...new SymbolIterator]);
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2769: No overload matches this call.
|
|
!!! error TS2769: The last overload gave the following error.
|
|
!!! error TS2769: Argument of type 'symbol[]' is not assignable to parameter of type 'number | ConcatArray<number>'.
|
|
!!! error TS2769: Type 'symbol[]' is not assignable to type 'ConcatArray<number>'.
|
|
!!! error TS2769: The types returned by 'slice(...)' are incompatible between these types.
|
|
!!! error TS2769: Type 'symbol[]' is not assignable to type 'number[]'.
|
|
!!! error TS2769: Type 'symbol' is not assignable to type 'number'.
|
|
!!! related TS2771 lib.es5.d.ts:--:--: The last overload is declared here. |