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

`@babel/generator` does not print decorators of private properties #10149

Open
nicolo-ribaudo opened this issue Jun 30, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@nicolo-ribaudo
Copy link
Member

commented Jun 30, 2019

Bug Report

Input Code

  • REPL or Repo link if applicable:
const input = `
class A {
  @dec
  foo;

  @dec
  #bar;
}
`;

const out = babel.transformSync(input, {
  configFile: false,
  plugins: [
    [require("@babel/plugin-syntax-decorators"), { decoratorsBeforeExport: true }],
    require("@babel/plugin-syntax-class-properties"),
  ],
});

console.log(out.code);

Current Behavior
It prints

class A {
  @dec
  foo;
  #bar;
}

Expected behavior/code

class A {
  @dec
  foo;
  @dec
  #bar;
}

Environment

  • Babel version(s): v7.4.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.