/** * Tree-sitter language detection and grammar resolution. * * Maps file extensions to tree-sitter language identifiers used by * the Smart Explore code analysis pipeline (outline, search, unfold). * Grammar loading is handled internally by parser.ts via native Node bindings. * * @task T509 */ /** Supported tree-sitter language identifiers. */ export type TreeSitterLanguage = 'typescript' | 'tsx' | 'javascript' | 'python' | 'go' | 'rust' | 'java' | 'c' | 'cpp' | 'ruby'; /** * Detect tree-sitter language from a file path or file name. * * @param filePath - Path to a source file (or bare file name) * @returns The detected language, or undefined if unsupported */ export declare function detectLanguage(filePath: string): TreeSitterLanguage | undefined; /** * Get the npm grammar package name for a language. * * The package name matches the native Node binding that parser.ts loads * via {@link createRequire}. Useful for diagnostics and install hints. * * @param language - A tree-sitter language identifier * @returns The npm package name containing the grammar */ export declare function grammarPackage(language: TreeSitterLanguage): string; /** All supported file extensions (without leading dot). */ export declare const SUPPORTED_EXTENSIONS: string[]; /** All supported languages (deduplicated). */ export declare const SUPPORTED_LANGUAGES: TreeSitterLanguage[]; //# sourceMappingURL=tree-sitter-languages.d.ts.map