-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve variadic call using spread syntax #7030
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing.
Just one check: does this add any requirements to the version of JS required?
In case, we should document it.
CC @cknitt on the version constraints. |
Applying by spread is ES6(ECMAScript 2015) spec, and has been supported longer than The only problem is IE11, which I don't think we support. |
I don't think we have documented the requirements on the JS version / spec at the moment. Starting with v12, ES6 (ECMAScript 2015) is required because we are now making use of the following ES6 features:
/cc @fhammerschmidt |
We should set a threshold for what syntax we support. But I think we should be fairly aggressive there so we can use newer features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff! Maybe all/parts of this could be implemented to use real array spreads instead of concats with the array spread syntax.
Right. It could be reused in other places like the array and dict output |
@cometkim ready to merge? |
Yep |
fyi https://caniuse.com/mdn-javascript_operators_spread_spread_in_function_calls