Skip to content 

IntervalCollection Class

Packages > @fluidframework/sequence > IntervalCollection

Signature:

export declare class IntervalCollection<TInterval extends ISerializableInterval> 

Constructors

List of constructors for this class
Constructor Modifiers Description
(constructor)(helpers, requiresClient, emitter, serializedIntervals) Constructs a new instance of the IntervalCollection class

Properties

List of properties for this class
Property Modifiers Type Description
attached boolean

Methods

List of methods on this class
Method Modifiers Description
add(startPosition, endPosition, intervalType, props)
addConflictResolver(conflictResolver)
addInternal(serializedInterval, local, op)
attachGraph(client, label)
delete(startPosition, endPosition)
deleteInterval(serializedInterval, local, op)
getView(onDeserialize)
serializeInternal()

Constructors

IntervalCollection.(constructor)

Constructs a new instance of the IntervalCollection class

Signature:

constructor(helpers: IIntervalHelpers<TInterval>, requiresClient: boolean, emitter: IValueOpEmitter, serializedIntervals: ISerializedInterval[]);

Parameters

List of parameters
Parameter Type Description
helpers IIntervalHelpers
requiresClient boolean
emitter IValueOpEmitter
serializedIntervals ISerializedInterval[]

Properties

attached

Signature:

get attached(): boolean;

Methods

add

Signature:

add(startPosition: number, endPosition: number, intervalType: MergeTree.IntervalType, props?: MergeTree.PropertySet): void;

Parameters

List of parameters
Parameter Type Description
startPosition number
endPosition number
intervalType MergeTree.IntervalType
props MergeTree.PropertySet

Returns:

void

addConflictResolver

Signature:

addConflictResolver(conflictResolver: MergeTree.IntervalConflictResolver<TInterval>): void;

Parameters

List of parameters
Parameter Type Description
conflictResolver MergeTree.IntervalConflictResolver

Returns:

void

addInternal

Signature:

addInternal(serializedInterval: ISerializedInterval, local: boolean, op: ISequencedDocumentMessage): IntervalCollectionView<TInterval>;

Parameters

List of parameters
Parameter Type Description
serializedInterval ISerializedInterval
local boolean
op ISequencedDocumentMessage

Returns:

IntervalCollectionView<TInterval>

attachGraph

Signature:

attachGraph(client: MergeTree.Client, label: string): void;

Parameters

List of parameters
Parameter Type Description
client MergeTree.Client
label string

Returns:

void

delete

Signature:

delete(startPosition: number, endPosition: number): void;

Parameters

List of parameters
Parameter Type Description
startPosition number
endPosition number

Returns:

void

deleteInterval

Signature:

deleteInterval(serializedInterval: ISerializedInterval, local: boolean, op: ISequencedDocumentMessage): void;

Parameters

List of parameters
Parameter Type Description
serializedInterval ISerializedInterval
local boolean
op ISequencedDocumentMessage

Returns:

void

getView

Signature:

getView(onDeserialize?: DeserializeCallback): Promise<IntervalCollectionView<TInterval>>;

Parameters

List of parameters
Parameter Type Description
onDeserialize DeserializeCallback

Returns:

Promise<IntervalCollectionView<TInterval>>

serializeInternal

Signature:

serializeInternal(): any[];

Returns:

any[]