Skip to content

Type Editor


Type Editor / @type-editor/changeset / simplify-changes/fill-change / fillChange

Function: fillChange()

ts
function fillChange(changes, fromB, toB): Change;

Defined in: simplify-changes/fill-change.ts:17

Creates a merged change that spans from fromB to toB, filling gaps between changes.

This function takes a sequence of changes and creates a single change that covers a broader range, filling any gaps between the original changes. The gaps are filled with spans using the data from adjacent changes.

Parameters

ParameterTypeDescription
changesreadonly Change<any>[]The array of changes to merge.
fromBnumberThe start position in the new document.
toBnumberThe end position in the new document.

Returns

Change

A new Change covering the expanded range.