ISequenceDeltaRange Interface
A range that has changed corresponding to a segment modification. \
To use, import via @fluidframework/sequence/legacy.
For more information about our API support guarantees, see here.
Signature
export interface ISequenceDeltaRange<TOperation extends MergeTreeDeltaOperationTypes = MergeTreeDeltaOperationTypes>
Type Parameters
| Parameter | Constraint | Default | Description |
|---|---|---|---|
| TOperation | MergeTreeDeltaOperationTypes | MergeTreeDeltaOperationTypes |
Properties
| Property | Alerts | Type | Description |
|---|---|---|---|
| operation | Beta |
TOperation | The type of operation that changed this range. |
| position | Beta |
number | The index of the start of the range. |
| propertyDeltas | Beta |
PropertySet | Deltas object which contains all modified properties with their previous values. Since undefined doesn't survive a round-trip through JSON serialization, the old value being absent is instead encoded with null. |
| segment | Beta |
ISegment | The segment that corresponds to the range. |
Property Details
operation
The type of operation that changed this range.
For more information about our API support guarantees, see here.
Signature
operation: TOperation;
Type: TOperation
Remarks
Consuming code should typically compare this to the enum values defined in MergeTreeDeltaOperationTypes.
position
The index of the start of the range.
For more information about our API support guarantees, see here.
Signature
position: number;
Type: number
propertyDeltas
Deltas object which contains all modified properties with their previous values. Since undefined doesn't survive a round-trip through JSON serialization, the old value being absent is instead encoded with null.
For more information about our API support guarantees, see here.
Signature
propertyDeltas: PropertySet;
Type: PropertySet
Remarks
This object is motivated by undo/redo scenarios, and provides a convenient "inverse op" to apply to undo a property change.
Example
If a segment initially had properties { foo: "1", bar: 2 } and it was annotated with { foo: 3, baz: 5 }, the corresponding event would have a propertyDeltas of { foo: "1", baz: null }.
segment
The segment that corresponds to the range.
For more information about our API support guarantees, see here.
Signature
segment: ISegment;
Type: ISegment