/** * TypeScript/JavaScript code extractor */ import type Parser from 'tree-sitter'; import { BaseExtractor } from './base.js'; import type { ExtractionResult } from '../types.js'; /** * Extractor for TypeScript and JavaScript code */ export declare class TypeScriptExtractor extends BaseExtractor { readonly language: string; getTargetNodeTypes(): string[]; /** * Check if a node should be included in extraction * Filters out pure JSX elements without logic */ protected shouldIncludeNode(node: Parser.SyntaxNode): boolean; /** * Check if a node is a pure JSX element without any logic * Pure JSX elements are just markup with no handlers, conditions, or state */ private isPureJSXElement; /** * Check if a node contains only JSX markup without handlers or logic */ private isJSXWithoutLogic; /** * Check if node contains JSX syntax */ private containsJSX; /** * Check if node has event handlers (onClick, onChange, etc.) */ private hasEventHandlers; /** * Check if node uses React hooks or state */ private hasHooksOrState; /** * Check if node has conditional logic */ private hasConditionalLogic; protected extractNode(node: Parser.SyntaxNode, _filePath: string, _content: string): ExtractionResult | null; /** * Extract function declaration */ private extractFunction; /** * Extract method definition */ private extractMethod; /** * Extract arrow function or function expression */ private extractArrowFunction; /** * Extract class declaration */ private extractClass; /** * Extract interface declaration */ private extractInterface; /** * Extract type alias */ private extractTypeAlias; /** * Extract enum declaration */ private extractEnum; /** * Extract variable/constant declaration */ private extractVariable; /** * Extract method signature from interface */ private extractMethodSignature; /** * Extract public field definition */ private extractPublicField; /** * Extract namespace or module declaration */ private extractNamespace; /** * Extract test block (describe, it, test, etc.) * Note: Only matches direct function calls (e.g., describe(), it()) * Does not match namespaced calls (e.g., jest.describe(), mocha.it()) */ private extractTestBlock; /** * Extract visibility modifier */ private extractVisibility; /** * Extract decorators */ private extractDecorators; } /** * JavaScript extractor (uses same logic as TypeScript) */ export declare class JavaScriptExtractor extends TypeScriptExtractor { readonly language: string; } //# sourceMappingURL=typescript.d.ts.map