Lawsun d230cfbce0 first commit il y a 1 an
..
lib d230cfbce0 first commit il y a 1 an
README.md d230cfbce0 first commit il y a 1 an
package.json d230cfbce0 first commit il y a 1 an

README.md

@babel/helper-split-export-declaration

API

declare export default splitExportDeclaration(path: NodePath);

Usage

import traverse from "@babel/traverse";
import splitExportDeclaration from "@babel/helper-split-export-declaration";

// ...

traverse(file, {
  ExportDefaultDeclaration(path) {
    if (!path.get("declaration").isClassDeclaration()) return;
    splitExportDeclaration(path);
  },
});