aboutsummaryrefslogtreecommitdiff
path: root/node_modules/@babel/helper-split-export-declaration/README.md
blob: 195f151e9229b516494f5f3522913a2b341d3469 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# @babel/helper-split-export-declaration

## API

```js
declare export default splitExportDeclaration(path: NodePath);
```

## Usage

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