/** * Information about a function extracted from source code. */ export interface FunctionInfo { /** Function name */ name: string; /** Starting line number (1-indexed) */ startLine: number; /** Ending line number (1-indexed) */ endLine: number; /** Parameter names */ params: string[]; /** Whether the function is exported */ isExported: boolean; } /** * Information about a class extracted from source code. */ export interface ClassInfo { /** Class name */ name: string; /** Starting line number (1-indexed) */ startLine: number; /** Ending line number (1-indexed) */ endLine: number; /** Method names defined in the class */ methods: string[]; /** Whether the class is exported */ isExported: boolean; } /** * Information about an import statement. */ export interface ImportInfo { /** Raw import path as written in source */ source: string; /** Resolved path to a project file (undefined if external dependency) */ resolvedPath?: string; /** Imported names (named imports, default import name, or namespace) */ names: string[]; } /** * Result of parsing a single source file for structural information. */ export interface ParseResult { /** Functions found in the file */ functions: FunctionInfo[]; /** Classes found in the file */ classes: ClassInfo[]; /** Import statements found in the file */ imports: ImportInfo[]; /** Exported names from the file */ exports: string[]; } /** * Parse TypeScript/JavaScript content and extract structural information. */ export declare function parseTypeScript(content: string): ParseResult; /** * Parse Python content and extract structural information. */ export declare function parsePython(content: string): ParseResult; /** * Parse Go content and extract structural information. */ export declare function parseGo(content: string): ParseResult; /** * Parse Rust content and extract structural information. */ export declare function parseRust(content: string): ParseResult; /** * Parse Java content and extract structural information. */ export declare function parseJava(content: string): ParseResult; /** * Parse generic content (PHP, Ruby, or unknown languages) using common patterns. * Falls back to empty result if nothing is detected. */ export declare function parseGeneric(content: string): ParseResult; /** * Parses a source file and extracts structural information using * regex-based extraction (no tree-sitter dependency). * * @param filePath - Absolute path to the file to parse * @param language - Detected language of the file (e.g., 'typescript', 'python') * @returns ParseResult with extracted functions, classes, imports, and exports */ export declare function parseFile(filePath: string, language: string): ParseResult;