import type { HashAnchor, HashMismatch } from "./types.ts"; /** * Parse a "LINE#HASH" reference string with tolerant normalization. * * Handles: * - Leading markers: `>>>`, `+`, `-` (from diff context) * - `# ` (hash followed by space) → normalize to `#` * - Trailing `|content` (from annotated lines) → strip */ export declare function parseLineRef(ref: string): HashAnchor; /** * Verify that an anchor's hash matches the actual line content. * Throws HashlineMismatchError on mismatch. */ export declare function validateLineRef(lines: string[], ref: string, hashWidth: number): void; /** * Batch-validate multiple line references. * Collects all mismatches and throws once with full context. */ export declare function validateLineRefs(lines: string[], refs: string[], hashWidth: number): void; /** * Whole-file version guard. Throw if expected ≠ actual. */ export declare function validateVersion(expected: string, actual: string): void; export declare class HashlineMismatchError extends Error { mismatches: HashMismatch[]; fileLines: string[]; constructor(mismatches: HashMismatch[], fileLines: string[]); /** * Scan all lines to find one whose hash matches `ref`'s expected hash. * Returns a "did you mean?" hint, or null if no match found. */ suggestLineForHash(ref: string, lines: string[], hashWidth: number): string | null; } //# sourceMappingURL=validation.d.ts.map