snapBatchEditRanges
constsnapBatchEditRanges: (snapshot,edits) => readonlyPieceTableEdit[]
The edits a batch will actually apply: validated, ordered, and snapped off any surrogate pair they would otherwise split. Callers that report a change to anyone else — the session’s change events, undo inversion, incremental re-render — must describe these, not the edits they were handed, or every consumer is told about a transformation that did not happen.
Snapping is idempotent, so a caller may run this and still hand the result to applyBatchToPieceTable.
Parameters
Section titled “Parameters”snapshot
Section titled “snapshot”PieceTableTreeSnapshot
readonly PieceTableEdit[]
Returns
Section titled “Returns”readonly PieceTableEdit[]