How to use the @babel/helper-create-class-features-plugin.FEATURES.privateMethods function in @babel/helper-create-class-features-plugin

To help you get started, we’ve selected a few @babel/helper-create-class-features-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github babel / babel / packages / babel-plugin-proposal-private-methods / src / index.js View on Github external
export default declare((api, options) => {
  api.assertVersion(7);

  return createClassFeaturePlugin({
    name: "proposal-private-methods",

    feature: FEATURES.privateMethods,
    loose: options.loose,

    manipulateOptions(opts, parserOpts) {
      parserOpts.plugins.push("classPrivateMethods");
    },
  });
});

@babel/helper-create-class-features-plugin

Compile class public and private fields, private methods and decorators to ES6

MIT
Latest version published 13 days ago

Package Health Score

95 / 100
Full package analysis