Get a change description for this change set.
False when there are actual changes in this set.
Get a description of the inverted form of these changes.
The length of the document before the change.
The length of the document after the change.
Compute the combined effect of applying another set of changes
after this one. The length of the document after this set should
match the length before other.
Iterate over the ranges changed by these changes. (See
ChangeSet.iterChanges for a
variant that also provides you with the inserted text.)
fromA/toA provides the extent of the change in the starting
document, fromB/toB the extent of the replacement in the
changed document.
When individual is true, adjacent changes (which are kept
separate for position mapping) are
reported separately.
Optionalindividual: booleanIterate over the changed ranges in the document, calling f for
each, with the range in the original document (fromA-toA)
and the range that replaces it in the new document
(fromB-toB).
When individual is true, adjacent changes are reported
separately.
Optionalindividual: booleanIterate over the unchanged parts left by these changes. posA
provides the position of the range in the old document, posB
the new position in the changed document.
Given another change set starting in the same document, maps this
change set over the other, producing a new change set that can be
applied to the document produced by applying other. When
before is true, order changes as if this comes before
other, otherwise (the default) treat other as coming first.
Given two changes A and B, A.compose(B.map(A)) and
B.compose(A.map(B, true)) will produce the same document. This
provides a basic form of operational
transformation,
and can be used for collaborative editing.
Optionalbefore: booleanMap this description, which should start with the same document
as other, over another set of changes, so that it can be
applied after it. When before is true, map as if the changes
in this happened before the ones in other.
Optionalbefore: booleanmode determines whether deletions should be
reported. It defaults to
MapMode.Simple (don't report
deletions).
Optionalassoc: numbermode determines whether deletions should be
reported. It defaults to
MapMode.Simple (don't report
deletions).
Serialize this change set to a JSON-representable value.
Check whether these changes touch a given range. When one of the
changes entirely covers the range, the string "cover" is
returned.
Optionalto: numberStaticemptyStaticfromStaticofCreate a change set for the given changes, for a document of the
given length, using lineSep as line separator.
OptionallineSep: string
A change set represents a group of modifications to a document. It stores the document length, and can only be applied to documents with exactly that length.