Closed
Description
function foo() {
let x = 123;
return x;
}
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?