mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
20 lines
577 B
Plaintext
20 lines
577 B
Plaintext
iteratorSpreadInArray5.ts(14,30): error TS2322: Type 'symbol' is not assignable to type 'number'.
|
|
|
|
|
|
==== iteratorSpreadInArray5.ts (1 errors) ====
|
|
class SymbolIterator {
|
|
next() {
|
|
return {
|
|
value: Symbol(),
|
|
done: false
|
|
};
|
|
}
|
|
|
|
[Symbol.iterator]() {
|
|
return this;
|
|
}
|
|
}
|
|
|
|
var array: number[] = [0, 1, ...new SymbolIterator];
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
!!! error TS2322: Type 'symbol' is not assignable to type 'number'. |