How to use the isInterfaceDeclaration function from @babel/types
Find comprehensive JavaScript @babel/types.isInterfaceDeclaration code examples handpicked from public code repositorys.
44 45 46 47 48 49 50 51 52 53
} } } else if (t.isTypeAlias(node) || t.isTSTypeAliasDeclaration(node)) { comment.kind = 'typedef'; } else if ( t.isInterfaceDeclaration(node) || t.isTSInterfaceDeclaration(node) ) { comment.kind = 'interface'; } else if (t.isVariableDeclaration(node)) {
509
0
0
+ 20 other calls in file
187 188 189 190 191 192 193 194 195 196
} } else if ( t.isClassDeclaration(declaration) || t.isFunctionDeclaration(declaration) || t.isTypeAlias(declaration) || t.isInterfaceDeclaration(declaration) || t.isTSTypeAliasDeclaration(declaration) || t.isTSInterfaceDeclaration(declaration) || t.isTSEnumDeclaration(declaration) || t.isTSDeclareFunction(declaration) ||
6
34
0
+ 3 other calls in file
166 167 168 169 170 171 172 173 174 175
} else if (t.isClassDeclaration(declaration)) { push(declaration.id.name, declaration, hasPrivateJsDoc(node.leadingComments)); } // Types (Flow only) else if (t.isTypeAlias(declaration) || t.isInterfaceDeclaration(declaration)) { push(declaration.id.name, declaration, hasPrivateJsDoc(node.leadingComments)); } // Unsupported types yet
1
2
0
@babel/types.identifier is the most popular function in @babel/types (20936 examples)