/** * Suggesting what somebody probably meant. * * Used for an unrecognised CLI flag and an unrecognised config key. Both are * the same failure: a name that looks right, is silently not the name the tool * reads, and leaves a limit unenforced while the author believes it is set. */ export declare function editDistance(a: string, b: string): number; /** * The closest candidate, or null when nothing is close enough to name. * * **The tolerance scales with the length of what was typed**, and that is the * whole reason this function exists rather than a fixed threshold. Three edits * is a plausible typo on `max-tokens` and a completely different word on * `llm` — which is how a fixed budget of three came to answer "did you mean * --help?" for `--llm`. A wrong guess is worse than no guess: it sends the * reader off to check something that was never the answer. */ export declare function nearestName(typed: string, candidates: readonly string[]): string | null; //# sourceMappingURL=nearest.d.ts.map