"Infer function return type" is annoyingly suggested in function bodies #42714
Labels
Bug
A bug in TypeScript
Domain: Refactorings
e.g. extract to constant or function, rename symbol
Effort: Moderate
Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".
Fix Available
A PR has been opened for this issue
Help Wanted
You can do this
Milestone
If your cursor is anywhere in the body of this function, you will get a code action to "Infer function return type".
This is annoying because it always provides a lightbulb in the editor
and that is doubly-annoying in cases where you think you have a quick fix but it ends up being the same useless code action.
I'm not exactly sure what the right way is to surface this refactoring in a way that's not intrusive. Maybe by only providing it on
return
statements and the function signature itself? Thoughts @jessetrinity @sandersn?The text was updated successfully, but these errors were encountered: