How to use babel-helper-explode-class - 1 common examples

To help you get started, we’ve selected a few babel-helper-explode-class 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-transform-decorators / src / index.js View on Github external
ClassDeclaration(path) {
        if (!hasDecorators(path)) return;
        doError(path);
        explodeClass(path);

        let ref = path.node.id;
        let nodes = [];

        nodes = nodes.concat(transformClass(path, ref, this).map((expr) => t.expressionStatement(expr)));
        nodes.push(t.expressionStatement(ref));

        path.insertAfter(nodes);
      },

babel-helper-explode-class

Helper function to explode class

MIT
Latest version published 8 years ago

Package Health Score

82 / 100
Full package analysis

Popular babel-helper-explode-class functions

Similar packages