Lawsun d230cfbce0 first commit 1 year ago
..
lib d230cfbce0 first commit 1 year ago
README.md d230cfbce0 first commit 1 year ago
package.json d230cfbce0 first commit 1 year ago

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);
  },
});