How to use the exportNamedDeclaration function from babel-types

Find comprehensive JavaScript babel-types.exportNamedDeclaration code examples handpicked from public code repositorys.

105
106
107
108
109
110
111
112
113
114

for (let key in cssData.properties) {
  let prop = parseSyntax(cssData.properties[key]);
  key = toCamelCase(key);
  statementList.push(
    t.exportNamedDeclaration(
      t.typeAlias(
        t.identifier(propertyName(key)),
        null,
        normalizeType(buildType(prop, key)),
fork icon10
star icon148
watch icon8

+ 17 other calls in file

64
65
66
67
68
69
70
71
72
73
/**
 * Transforms a "root" type (Fragment or LinkedField) into a Flow export type
 * statement.
 */
function transform(node: Fragment | LinkedField): Annotation {
  return t.exportNamedDeclaration(
    t.typeAlias(
      t.identifier(node.name),
      null,
      t.objectTypeAnnotation(
fork icon0
star icon1
watch icon2

+ 19 other calls in file

162
163
164
165
166
167
168
169
170
171
        },
});

// Iterate over indexFileRequirements and add missing listings to the indexFile program body
Object.keys(indexFileRequirements).forEach((key) => {
        const entry = babelTypes.exportNamedDeclaration(
                null,
                [],
                babelTypes.stringLiteral(indexFileRequirements[key])
        );
fork icon393
star icon0
watch icon4

28
29
30
31
32
33
34
35
36
37
}

schema() {
  return [
    ...this.schemaDeclarations().map(declaration => {
      return t.exportNamedDeclaration(declaration, []);
    }),
    ...this.defineAssocs(),
  ];
}
fork icon0
star icon0
watch icon2

Other functions in babel-types

Sorted by popularity

function icon

babel-types.identifier is the most popular function in babel-types (4076 examples)