Constructors
C new TextChangeRange(span: ts.TextSpan, newLength: number) void
Initializes a new instance of TextChangeRange.
Parameters:
Name | Type |
---|---|
span |
ts.TextSpan |
newLength |
number |
Properties
P unchanged: ts.TextChangeRange
Methods
M collapseChangesAcrossMultipleVersions(changes: ts.TextChangeRange[]) ts.TextChangeRange
Called to merge all the changes that occurred across several versions of a script snapshot into a single change. i.e. if a user keeps making successive edits to a script we will have a text change from V1 to V2, V2 to V3, ..., Vn.
This function will then merge those changes into a single change range valid between V1 and Vn.
Parameters:
Name | Type |
---|---|
changes |
Array.<ts.TextChangeRange> |
Width of the span after the edit. A 0 here would represent a delete