-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed as not planned
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
π Search Terms
desctructure noUnusedLocals rest
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about noUnusedLocals
β― Playground Link
π» Code
function moo() {
const A = {a : 1, b : 2}
// no error on b
const { b, ...rest } = A;
// error on a as expected
const { a } = A
const c = 1;
}
π Actual behavior
no error on an unused local
π Expected behavior
error on any unused local whether a ...rest param is used or not
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug