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)),
10
148
8
+ 17 other calls in file
GitHub: pranaygp/relay
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(
0
1
2
+ 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]) );
393
0
4
28 29 30 31 32 33 34 35 36 37
} schema() { return [ ...this.schemaDeclarations().map(declaration => { return t.exportNamedDeclaration(declaration, []); }), ...this.defineAssocs(), ]; }
0
0
2
babel-types.identifier is the most popular function in babel-types (4076 examples)