import Parser from 'tree-sitter'; import { SupportedLanguages } from '../../config/supported-languages.js'; export declare const isLanguageAvailable: (language: SupportedLanguages) => boolean; export declare const loadParser: () => Promise; export declare const loadLanguage: (language: SupportedLanguages, filePath?: string) => Promise; /** * Parse source code using tree-sitter's string input path with an adaptive * native buffer size. * * The callback input API receives byte offsets. Returning JavaScript string * slices from those byte offsets is unsafe for UTF-8/multi-byte content and has * caused native tree-sitter crashes in large repositories. Use the stable string * input path instead and raise tree-sitter's internal buffer for large files. * * @param content - Full source file content as UTF-8 string * @param oldTree - Optional previous tree for incremental parsing (must call tree.edit() first) * @returns Parsed syntax tree */ export declare const parseContent: (content: string, oldTree?: any) => any;