Bug Report
🔎 Search Terms
extract function single-line if
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about whether Tang was really invented by NASA
💻 Code
functionf(){return[].filter(x=>{if(!x)returnfalse;});}🙁 Actual behavior
Select the arrow function callback of filter and run “Extract to inner function.” The formatting of the function contents should be the same in the extracted function.
🙂 Expected behavior
functionnewFunction(): (value: any,index: number,array: any[])=>unknown{returnx=>{if(!x)returnfalse;// New line added};}
Bug Report
🔎 Search Terms
extract function single-line if
🕗 Version & Regression Information
💻 Code
🙁 Actual behavior
Select the arrow function callback of
filterand run “Extract to inner function.” The formatting of the function contents should be the same in the extracted function.🙂 Expected behavior