import type { PathLike } from "node:fs"; import type { DetectLanguage, LanguageDetection } from "./src/detect"; import { DETECTION_ERROR } from "./src/detect"; import { detectByContent } from "./src/detectByContent"; import { detectByExtension } from "./src/detectByExtension"; import { heuristics, languages } from "./language/provider"; import { toRegex } from "./src/disambiguations"; /** * Applies heuristic analysis to determine the correct language when the file extension is ambiguous. * * @note * - When a file extension maps to multiple possible languages. * - This function loads the file content and compares it against known heuristics for each candidate language. */ export declare function detectLanguage(filePath: PathLike): Promise; /** * Detects programming languages for multiple files * using extension and content * * @note This is a wrapper around the `detectLanguage` function. * * @param files - Array of file paths to analyze. */ export declare function detectLanguagesInFiles(files: PathLike[]): Promise<{ detected: DetectLanguage[]; failed: PathLike[]; }>; export { type DetectLanguage, type LanguageDetection, detectByExtension, detectByContent, DETECTION_ERROR, heuristics, languages, toRegex };