How to use the isExportNamedDeclaration function from @babel/types

Find comprehensive JavaScript @babel/types.isExportNamedDeclaration code examples handpicked from public code repositorys.

192
193
194
195
196
197
198
199
200
function isExport(node) {
        return (
                t.isExportAllDeclaration(node) ||
                t.isExportDeclaration(node) ||
                t.isExportDefaultDeclaration(node) ||
                t.isExportNamedDeclaration(node) ||
                t.isExportNamespaceSpecifier(node)
        );
}
fork icon2
star icon35
watch icon2

+ 33 other calls in file

89
90
91
92
93
94
95
96
97
98
}

// 覆盖ExportAllDeclaration、ExportNamedDeclaration、ImportDeclaration
if (
  t.isExportAllDeclaration(path.node) ||
  t.isExportNamedDeclaration(path.node) ||
  t.isImportDeclaration(path.node)
) {
  if (
    path.node &&
fork icon1
star icon5
watch icon0

18
19
20
21
22
23
24
25
26
27
28


function gatherNodeParts(node, parts) {
  switch (node == null ? void 0 : node.type) {
    default:
      if (t.isModuleDeclaration(node)) {
        if ((t.isExportAllDeclaration(node) || t.isExportNamedDeclaration(node) || t.isImportDeclaration(node)) && node.source) {
          gatherNodeParts(node.source, parts);
        } else if ((t.isExportNamedDeclaration(node) || t.isImportDeclaration(node)) && node.specifiers && node.specifiers.length) {
          for (const e of node.specifiers) gatherNodeParts(e, parts);
        } else if ((t.isExportDefaultDeclaration(node) || t.isExportNamedDeclaration(node)) && node.declaration) {
fork icon0
star icon1
watch icon1

+ 33 other calls in file

Other functions in @babel/types

Sorted by popularity

function icon

@babel/types.identifier is the most popular function in @babel/types (20936 examples)