Blame view

node_modules/@babel/helper-split-export-declaration/README.md 428 Bytes
ce4c83ff   wxy   初始提交
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);
    },
  });
  ```