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

Remove unused destructured array params when compressing #8670

Closed
alshdavid opened this issue Feb 28, 2024 · 1 comment · Fixed by #8730
Closed

Remove unused destructured array params when compressing #8670

alshdavid opened this issue Feb 28, 2024 · 1 comment · Fixed by #8730
Assignees
Milestone

Comments

@alshdavid
Copy link

Describe the feature

const [a,b,c,d,e] = [1,2,3,4,5]
console.log(c)

can be compressed to

const [,,c] = [1,2,3,4,5]
console.log(c)

however it's currently unchanged, resulting in

const [a,b,c,d,e] = [1,2,3,4,5]
console.log(c)

Babel plugin or link to the feature description

No response

Additional context

Playground link

@kdy1 kdy1 added this to the Planned milestone Feb 28, 2024
@kdy1 kdy1 self-assigned this Mar 12, 2024
kdy1 added a commit that referenced this issue Mar 12, 2024
@kdy1 kdy1 modified the milestones: Planned, v1.4.7 Mar 13, 2024
@swc-bot
Copy link
Collaborator

swc-bot commented Apr 12, 2024

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

3 participants