/** * Fix Applier * Apply automatic fixes to source code with collision detection. */ import type { Diagnostic, ValidationContext } from './types.js'; /** * Result of applying fixes to source code. */ export interface ApplyResult { /** Modified source code with fixes applied */ readonly modified: string; /** Number of fixes successfully applied */ readonly applied: number; /** Number of fixes skipped */ readonly skipped: number; /** Reasons for skipped fixes */ readonly skippedReasons: Array<{ code: string; reason: string; }>; } /** * Apply automatic fixes to source code. * * Constraints: * - Applies fixes in reverse position order (end to start) to avoid offset shifts * - Skips fixes where applicable === false * - Detects collisions (overlapping ranges) and skips with reason * - Verifies modified source parses successfully * - Throws if any applied fix creates invalid syntax * * @param source - Original source code * @param diagnostics - Diagnostics with potential fixes * @param context - Validation context (unused but required by spec) * @returns ApplyResult with modified source and counts * @throws Error if applied fixes create invalid syntax [EC-6] */ export declare function applyFixes(source: string, diagnostics: Diagnostic[], _context: ValidationContext): ApplyResult;