lhl 7eff0e2ec0 1-9 3 月之前
..
lib 7eff0e2ec0 1-9 3 月之前
README.md 7eff0e2ec0 1-9 3 月之前
package.json 7eff0e2ec0 1-9 3 月之前

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