5 ms·
The spread syntax is native to JavaScript. TS wouldn't complain about the first case, because as the parent said, it is a valid operation. TS only complains ab
by zdragnar 2y ago
The spread syntax is native to JavaScript. TS wouldn't complain about the first case, because as the parent said, it is a valid operation.
TS only complains about valid operations if there's some potential mistake due to ambiguity, usually when relying on to strong conversions such as adding a string and an array together or some other nonsense.