/** * Apply Writeback Plan — Write formula results back to the live workbook. * * This is the **only** file that mutates live workbook/cell objects in the * new engine pipeline. It reads a `WritebackPlan` and applies each operation * to the workbook. * * ## Responsibilities * * 1. Apply `ScalarWrite` → set `cell.result`. * 2. Apply `CSEWrite` → distribute array across CSE range, update session cache. * 3. Apply `SpillWrite` → write source + ghost cells, update persistent maps. * 4. Apply `SpillErrorWrite` → set #SPILL! on source cell. * 5. Apply `CleanupWrite` → clear stale ghost cells. * 6. Apply `PreserveWrite` → no-op (cell keeps existing result). * 7. Update persistent spill maps and ghost snapshot maps. */ import type { WorkbookLike } from "../materialize/types.js"; import type { WritebackPlan } from "../materialize/writeback-plan.js"; /** * Apply a `WritebackPlan` to a live workbook. * * This mutates the workbook in-place. Operations are applied in order. * After all operations, persistent spill metadata is updated. */ export declare function applyWritebackPlan(workbook: WorkbookLike, plan: WritebackPlan): void;