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

(es/minifier): unused arguments of functions not dropped in array or object #9945

Open
Le0Developer opened this issue Jan 25, 2025 · 0 comments

Comments

@Le0Developer
Copy link

Describe the feature

If a function is declared inside an array or object, unused arguments don't get removed.

const arr = [
    function test(unused) {}
]

const obj = {
    a: function test(unused) {}
}

function test(unused) {}

console.log(arr, obj, test)

Output:

console.log([
    function(unused) {}
], {
    a: function(unused) {}
}, function() {});

Babel plugin or link to the feature description

No response

Additional context

Playground link

@kdy1 kdy1 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 25, 2025
@kdy1 kdy1 reopened this Jan 25, 2025
@kdy1 kdy1 closed this as completed Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants