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
Object Method Shorthand #13
Comments
For anyone interested in picking up this task, it'll be important to distinguish the difference between the two cases. Case A: (anonymous function) {
x: function() { ... }
} Case B: (named function) {
x: function someNamedFunction() { ... }
} Automatically converting the unnamed function shouldn't cause any issues, but converting the named function can be problematic if the named function involves recursion or event binding/unbinding - a good example is documented here. If we're ok letting this be a potentially breaking transformation, I think we should go ahead and convert both cases. If we want this to be a safe transformation, I think we should only transform case A. As an aside, it might be nice to have the ability to an |
Convert object methods into shorthand
The text was updated successfully, but these errors were encountered: