How to use the isClassExpression function from @babel/types
Find comprehensive JavaScript @babel/types.isClassExpression code examples handpicked from public code repositorys.
GitHub: nwjs/v8
40 41 42 43 44 45 46 47 48 49
} renamed.add(binding.identifier); if (babelTypes.isClassDeclaration(binding.path.node) || babelTypes.isClassExpression(binding.path.node)) { path.scope.rename(name, '__c_' + context.classIndex++); } else if (babelTypes.isFunctionDeclaration(binding.path.node) || babelTypes.isFunctionExpression(binding.path.node)) { path.scope.rename(name, '__f_' + context.funcIndex++);
46
35
0
GitHub: HarryHoudini/reselector
68 69 70 71 72 73 74 75 76 77
do { isComponent = isComponent || ( t.isArrowFunctionExpression(currentPath.node) || t.isFunctionExpression(currentPath.node) || t.isClassExpression(currentPath.node) ) prevPaths.push(currentPath) currentPath = currentPath.parentPath
10
0
1
+ 5 other calls in file
55 56 57 58 59 60 61 62 63 64 65 66 67
"/": 9, "%": 9, "**": 10 }; const isClassExtendsClause = (node, parent) => (t.isClassDeclaration(parent) || t.isClassExpression(parent)) && parent.superClass === node; const hasPostfixPart = (node, parent) => (t.isMemberExpression(parent) || t.isOptionalMemberExpression(parent)) && parent.object === node || (t.isCallExpression(parent) || t.isOptionalCallExpression(parent) || t.isNewExpression(parent)) && parent.callee === node || t.isTaggedTemplateExpression(parent) && parent.tag === node || t.isTSNonNullExpression(parent); function NullableTypeAnnotation(node, parent) {
0
0
0
+ 2 other calls in file
@babel/types.identifier is the most popular function in @babel/types (20936 examples)