"Extract to inner function" refactoring not available inside function expression #44110
Labels
Bug
A bug in TypeScript
Domain: Refactorings
e.g. extract to constant or function, rename symbol
Help Wanted
You can do this
Milestone
Bug Report
π Search Terms
vs code quick fix refactoring code action arrow anonymous function
π Version & Regression Information
β― Playground Link
N/A
π» Code
const y
in either of the above function expressionsπ Actual behavior
The "extract to inner function" refactoring is not listed.
π Expected behavior
The "extract to inner function" refactoring is listed and produces this code:
Note: ideally it would produce arrow functions but that's a separate issue: #31860
It seems this refactoring is only available inside of function declarations. Is there a reason for this?
This produces:
The text was updated successfully, but these errors were encountered: