Allow ArrayLike as a spread source
See original GitHub issueWhen trying to pass caller arguments to another function with ...arguments
the compiler complains with Type 'IArguments' is not an array type
. Version 1.8.9.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:5
- Comments:27 (19 by maintainers)
Top Results From Across the Web
Spread syntax (...) - JavaScript - MDN Web Docs - Mozilla
The spread (...) syntax allows an iterable, such as an array or string, to be expanded in places where zero or more arguments...
Read more >Why do you need to know about Array-like Objects?
In this article, we will learn about JavaScript array-like objects ... We are using the spread operator on arguments and are now allowed...
Read more >Spread Syntax ES6 - javascript
Spread allows sugared syntax on top of more clunky direct array ... symbol to iterate through Arrays and Array-like Objects like :.
Read more >Understanding JavaScript spread and rest syntax
This means that, while we can use spread to pass a dynamic number of function arguments, our function isn't dynamic enough yet to...
Read more >6 Use Cases of Spread with Array in JavaScript
MDN: Spread syntax allows an iterable such as an array expression or string to ... MDN: arguments is an Array-like object accessible inside ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So, to clarify, as of this day it still doesn’t work, and the reason being - it doesn’t work in FireFox.
In the meantime, all our Node.js code in JavaScript uses
arguments
for spread operator without any issues, but the TypeScript can’t/won’t do it regardless, for compatibility with FireFox.Shouldn’t support for spread of array-like objects become the default at this point, or at least default when building for the server-side?
@aaronresnick as mentioned in the PR text, when targeting ES3/ES5 you have to use
--downlevelIteration
. Are you using that?