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

Why legacy? #4

Closed
sergeysova opened this issue Dec 5, 2015 · 3 comments
Closed

Why legacy? #4

sergeysova opened this issue Dec 5, 2015 · 3 comments

Comments

@sergeysova
Copy link

Why decorators was removed from Babel?
I use it in many projects.

function Hack(classTarget) {
  classTarget.prototype.method = function() {
    console.log("Echo:", this.echo);
  }
}


@Hack
class Random {
  constructor() {
    this.echo = "Entropy";
  }
}


let obj = new Random();
obj.method();
@themouette
Copy link

You can find more information on this babel issue

@loganfsmyth
Copy link
Owner

Leaving this open as a TODO for myself to add to the README. As @themouette said, that issue is a good source of info. Here's my post from there: http://phabricator.babeljs.io/T2645#67560

This module should allow you to use decorators like you did in Babel 5. Some things are still lacking, but simpler decorators to mutate values should work.

@loganfsmyth
Copy link
Owner

I added a bit more of a note to the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants