Closed
Description
As per the version 1.30 release notes:
Renames handle JS/TS destructuring properly
Renames now handle JavaScript and TypeScript destructuring and will introduce an alias if needed
This means that renaming a property will result in the property being aliased by it's old name wherever destructuring assignment has been used. For example:
// before rename
const x = {
y: 'value'
}
const { y } = x;
console.log(y);
// after rename
const x = {
z: 'value'
}
const { z: y } = x;
console.log(y);
Previously, the destructed parameter's name would be updated, as well as all of its usages:
// before rename
const x = {
y: 'value'
}
const { y } = x;
console.log(y);
// after rename
const x = {
z: 'value'
}
const { z } = x;
console.log(z);
Can you please make this new behaviour optional?