Skip to main content
Version: v2

ISequenceDeltaRange Interface

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​

ParameterConstraintDefaultDescription
TOperationMergeTreeDeltaOperationTypesMergeTreeDeltaOperationTypes

Properties​

PropertyAlertsTypeDescription
operationBetaTOperationThe type of operation that changed this range.
positionBetanumberThe index of the start of the range.
propertyDeltasBetaPropertySetDeltas 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.
segmentBetaISegmentThe segment that corresponds to the range.

Property Details​

operation​

The type of operation that changed this range.

This API is provided for existing users, but is not recommended for new users.

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 for existing users, but is not recommended for new users.

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 for existing users, but is not recommended for new users.

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 for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature​

segment: ISegment;

Type: ISegment