Skip to content
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

Hoist arrow functions in methods to class scope #1

Closed
motiz88 opened this issue Sep 10, 2016 · 1 comment
Closed

Hoist arrow functions in methods to class scope #1

motiz88 opened this issue Sep 10, 2016 · 1 comment

Comments

@motiz88
Copy link
Owner

motiz88 commented Sep 10, 2016

In:

class A {
  handle(data) {
    //...
  }
  method () {
    return trampoline(data => this.handle(data));
  }
}

Out:

class A {
  handle(data) {
    //...
  }
  _hoistedAnonymousFunction = data => this.handle(data);
  method () {
    return trampoline(this._hoistedAnonymousFunction);
  }
}
@motiz88
Copy link
Owner Author

motiz88 commented Apr 2, 2017

Closing via #5.

@motiz88 motiz88 closed this as completed Apr 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant