/** * Merged file reconstruction from entity merge results. * * Follows theirs entity order (to preserve incoming structure), interpolating * the inter-entity whitespace/comments from the theirs source verbatim. * Entities that only exist in ours (ours-added) are appended at the end. */ import type { TopLevelEntity } from "./entities.js"; import type { EntityMergeResult } from "./merge.js"; /** * Reconstruct the merged source file from entity merge results. * * Strategy: * 1. Walk theirs entities in order. * - Emit the source gap (whitespace, comments) between consecutive * entities, taken verbatim from `theirsSource`. * - Emit the merged text for each entity (or skip if deleted). * 2. Emit the trailing content from `theirsSource` after the last entity. * 3. Append any entities that only exist in ours (ours-added), separated * by a newline. * * @param merges - Merge decision per entity signature * @param theirsEntities - Top-level entities from the theirs version (ordered) * @param oursEntities - Top-level entities from the ours version (ordered) * @param theirsSource - Full source text of the theirs version (for gaps) */ export declare function reconstructFile(merges: EntityMergeResult[], theirsEntities: TopLevelEntity[], oursEntities: TopLevelEntity[], theirsSource: string): string; //# sourceMappingURL=reconstruct.d.ts.map