* 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)
| 2842 | * Base {…})`), which is passed over as before (#2499). |
| 2843 | */ |
| 2844 | private isClassTypeNode(node: SyntaxNode, nodeType: string): boolean { |
| 2845 | if (!this.extractor!.classTypes.includes(nodeType)) return false; |
| 2846 | return nodeType !== 'class' || !CLASS_EXPRESSION_LANGUAGES.has(this.language) || !!getChildByField(node, 'name'); |
| 2847 | } |
| 2848 | |
| 2849 | private extractClass(node: SyntaxNode, kind: NodeKind = 'class'): void { |
| 2850 | if (!this.extractor) return; |
no test coverage detected