/** * The one primitive that mutates a document: apply a set of non-overlapping * range replacements in a single pass. Because the model owns whitespace via * `trailingGap`, every edit here is an exact byte-range replacement — there are * no newline heuristics. Callers decide the ranges and text; this just stitches * the untouched spans back together, so regions outside an edit are unchanged. */ import { DocumentRange } from "./types.js"; export interface Edit { range: DocumentRange; text: string; } export declare class OverlappingEditsError extends Error { } /** * Apply `edits` to `document`. Edits may be given in any order and may be * insertions (`start === end`); they must not overlap. Returns the new * document. */ export declare const applyEdits: (document: string, edits: Edit[]) => string; /** Replace a single range's text. */ export declare const spliceRange: (document: string, range: DocumentRange, text: string) => string; //# sourceMappingURL=splice.d.ts.map