-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CodeAction: convert lambda expression declaration to function #23299
Comments
+1. Add braces is very useful, too. |
1 similar comment
+1. Add braces is very useful, too. |
Kingwl's proposals always help me a lot. |
Kingwl's proposals always help AngryPowman a lot. |
Kingwl's proposals always help AngryPowman a lottery. |
I can't live without Kingwl's proposals. |
Hi We're a team of two, currently on our bachelor thesis. We'd like to implement this issue. Estimated timeframe is about 2 weeks, at most 4 weeks. We're looking to do other refactorings and code fixes as well, but this would come first. |
could bachelor thesis based on an open source project with Apache License 2.0?😂 |
I don't know about other countries, but I don't see why it couldn't. It's approved anyway. We're already 3 weeks in. It's more of an engineering project than anything else. But we're getting slightly off-topic here... :P |
I've got a question about reversing your example, @Kingwl. Of course, reversing an anonymous function makes sense. (More likely to go from right to left here)
to
or even
to
But what about named function to lambda? Is that actually a use-case? Afaik, Webstorm does not support this. Maybe for a good reason?
to
Last question (for now): Do we also support lambda to method? Of course, we would have to check for class scope.
to
|
if you want to edit, convert, or transform the parameter, but actually, add braces could cover the case
|
You are right. They are different - and also already implemented. So to clarify, there are only 2 cases that are in the scope of this refactor. Your example and this:
Edit: But |
Thanks! |
TypeScript Version: 2.7.0-dev.201xxxxx
Code
Expected behavior:
Actual behavior:
none
btw: also convert function to lambda expression
The text was updated successfully, but these errors were encountered: