/** * Applies a diff hunk to a file or creates a new file if necessary. * Follows the same logic as the Python version. * * @param fname - File path to modify * @param content - Current content of the file, or null if file doesn't exist * @param hunk - The diff hunk to apply * @returns The new content if successful, or undefined if application fails */ export declare function doReplace(fname: string, content: string | null, hunk: string[]): string | undefined; /** * Helper function to collapse repeated characters in a string. * This is the TypeScript implementation of the Python collapse_repeats function. * * @param s - String to process * @returns String with consecutive duplicate characters replaced by a single instance */ export declare function collapseRepeats(s: string): string;