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

Decorators are broken in 6.x #2727

Closed
alexbyk opened this Issue Nov 1, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@alexbyk

alexbyk commented Nov 1, 2015

I tried several combinations. Nothing works:

function decorator(Class) { return Class; }

@decorator
class B { }
{
  "presets": ["es2015", "stage-0"],
  "plugins": [ "transform-decorators", "syntax-decorators"]
}

result (decorator just silently ignored):

...
var B = function B() {
  _classCallCheck(this, B);
};

with this order: ["stage-0", "es2015"]
it throws an error TypeError: src/mxn/decorators.func.test.js: Property right of AssignmentExpression expected node to be of a type ["Expression"] but instead got "Decorator"

@kittens

This comment has been minimized.

Show comment
Hide comment
@kittens

kittens Nov 1, 2015

Member

Duplicate of #2645.

Member

kittens commented Nov 1, 2015

Duplicate of #2645.

@kittens kittens closed this Nov 1, 2015

@lock lock bot added the outdated label Jul 11, 2018

@lock lock bot locked as resolved and limited conversation to collaborators Jul 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.