ISequenceDeltaRange Interface
Packages > fluid-framework > ISequenceDeltaRange
A range that has changed corresponding to a segment modification.
This API is provided for existing users, but is not recommended for new users.
To use, import via fluid-framework/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 |
Alpha
|
TOperation | The type of operation that changed this range. |
position |
Alpha
|
number | The index of the start of the range. |
propertyDeltas |
Alpha
|
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 |
Alpha
|
ISegment | The segment that corresponds to the range. |
Property Details
operation
The type of operation that changed this range.
This API is provided as an alpha preview and may change without notice.
To use, import via fluid-framework/alpha
.
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.
This API is provided as an alpha preview and may change without notice.
To use, import via fluid-framework/alpha
.
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
.
This API is provided as an alpha preview and may change without notice.
To use, import via fluid-framework/alpha
.
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.
This API is provided as an alpha preview and may change without notice.
To use, import via fluid-framework/alpha
.
For more information about our API support guarantees, see here .
Signature
segment: ISegment;
Type: ISegment