* Whether `node` is a class to extract: one of the language's class types, * except a TS/JS class expression without a name (`register(class extends * Base {…})`), which is passed over as before (#2499).
(node: SyntaxNode, nodeType: string)
| 2725 | * Base {…})`), which is passed over as before (#2499). |
| 2726 | */ |
| 2727 | private isClassTypeNode(node: SyntaxNode, nodeType: string): boolean { |
| 2728 | if (!this.extractor!.classTypes.includes(nodeType)) return false; |
| 2729 | return nodeType !== 'class' || !CLASS_EXPRESSION_LANGUAGES.has(this.language) || !!getChildByField(node, 'name'); |
| 2730 | } |
| 2731 | |
| 2732 | private extractClass(node: SyntaxNode, kind: NodeKind = 'class'): void { |
| 2733 | if (!this.extractor) return; |
no test coverage detected