Skip to content
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

Issue with "Spread syntax (...)": should it be rest in destructuring? #9457

Closed
arturcarvalho opened this issue Mar 11, 2021 · 4 comments
Closed
Labels
data:js 📟 Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript

Comments

@arturcarvalho
Copy link
Contributor

MDN URL: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax

Hi there,

On the browser compatibility table for the spread syntax, it is mentioned "spread destructuring". Shouldn't it be "rest destructuring" or something along those lines? Initial discussion.

The error when the syntax is with the wrong order also hints at that:

image

Thanks and have a nice day!

MDN Content page report details
@sideshowbarker sideshowbarker transferred this issue from mdn/content Mar 15, 2021
@queengooborg queengooborg added the data:js 📟 Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript label Mar 15, 2021
@ddbeck
Copy link
Collaborator

ddbeck commented Mar 15, 2021

Interesting find. Thanks for reporting this, @arturcarvalho!

I think the problem here is that we've duplicated the data for this syntax:

If I've understood correctly, then the fix here would be to delete the spread feature. I'd welcome a PR (from you or another contributor) making this change.

@arturcarvalho
Copy link
Contributor Author

Hi @ddbeck, thanks for the reply!

Exactly, deleting would make the table correct. I can send a PR.
Would it suffice to delete that part you mentioned on the JSON file browser-compat-data/javascript/operators/spread.json?
It looks like a generated file.

Have a nice day.

@ddbeck
Copy link
Collaborator

ddbeck commented Mar 15, 2021

@arturcarvalho That's correct. Our data files aren't actually generated (though we do a fair amount of automation against them)—think of them as very structured writing. 😃

@arturcarvalho
Copy link
Contributor Author

@arturcarvalho That's correct. Our data files aren't actually generated (though we do a fair amount of automation against them)—think of them as very structured writing. 😃

I laughed out loud with the very structured writing 😄

I'll send a PR after work. Thanks for the reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:js 📟 Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript
Projects
None yet
Development

No branches or pull requests

3 participants