Packages > @fluidframework/merge-tree > SequenceOffsets

SequenceOffsets Interface

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

To use, import via @fluidframework/merge-tree/legacy.

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

Signature

export interface SequenceOffsets

Properties

Property Alerts Type Description
posBreakpoints Alpha number[]
seqs Alpha (number | AttributionKey | null)[] Parallel array with posBreakpoints which tracks the seq of insertion.

Property Details

posBreakpoints

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/merge-tree/alpha.

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

Signature

posBreakpoints: number[];

Type: number[]

seqs

Parallel array with posBreakpoints which tracks the seq of insertion.

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/merge-tree/alpha.

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

Signature

seqs: (number | AttributionKey | null)[];

Type: (number | AttributionKey | null)[]

Remarks

We use null here rather than undefined as round-tripping through JSON converts undefineds to null anyway

Example

If seqs is [45, 46] and posBreakpoints is [0, 3], the section of the string between offsets 0 and 3 was inserted at seq 45 and the section of the string between 3 and the length of the string was inserted at seq 46.