Join the Herd 🐾
Fixed
- Extract Type will now put the cursor at the proper position to rename the extracted type when leading comments are present. Thanks @fabien0102 for catching this!
- Extracting multiple variables on the same line will correctly position the cursor to trigger a rename. That was an annoying edge-case, not anymore!
Changed
- @chrstnbrn improved error messages for when the AST can't be built. That should help you understand what went wrong when things don't work 👍
- Convert to Arrow Function will only prompt a quick fix if your cursor is on the function declaration, not its body. This will reduce the noise when working with large functions.
- Extract Variable will re-use existing destructured declaration. So for this code:
function test(obj) {
return obj.x + obj.y * obj.x + obj.y;
}
After extracting x
and y
(and choosing to "destructure" it) the end result will now be:
function test(obj) {
const { x, y } = obj;
return x + y * x + y;
}
- @ZakMiller made "Convert for to forEach" works with for..of loops too. Nice!