IntervalCollectionView Class
Packages > @fluidframework/sequence > IntervalCollectionView
Signature:
export declare class IntervalCollectionView<TInterval extends ISerializableInterval> extends EventEmitter
Extends: EventEmitter
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(client, savedSerializedIntervals, label, helpers, emitter) | Constructs a new instance of the IntervalCollectionView class |
Methods
Constructors
IntervalCollectionView.(constructor)
Constructs a new instance of the IntervalCollectionView
class
Signature:
constructor(client: MergeTree.Client, savedSerializedIntervals: ISerializedInterval[], label: string, helpers: IIntervalHelpers<TInterval>, emitter: IValueOpEmitter);
Parameters
Parameter | Type | Description |
---|---|---|
client | MergeTree.Client | |
savedSerializedIntervals | ISerializedInterval[] | |
label | string | |
helpers | IIntervalHelpers |
|
emitter | IValueOpEmitter |
Methods
add
Signature:
add(start: number, end: number, intervalType: MergeTree.IntervalType, props?: MergeTree.PropertySet): void;
Parameters
Parameter | Type | Description |
---|---|---|
start | number | |
end | number | |
intervalType | MergeTree.IntervalType | |
props | MergeTree.PropertySet |
Returns:
void
addConflictResolver
Signature:
addConflictResolver(conflictResolver: MergeTree.IntervalConflictResolver<TInterval>): void;
Parameters
Parameter | Type | Description |
---|---|---|
conflictResolver | MergeTree.IntervalConflictResolver |
Returns:
void
addInternal
Signature:
addInternal(serializedInterval: ISerializedInterval, local: boolean, op: ISequencedDocumentMessage): this;
Parameters
Parameter | Type | Description |
---|---|---|
serializedInterval | ISerializedInterval | |
local | boolean | |
op | ISequencedDocumentMessage |
Returns:
this
attachDeserializer
Signature:
attachDeserializer(onDeserialize: DeserializeCallback): void;
Parameters
Parameter | Type | Description |
---|---|---|
onDeserialize | DeserializeCallback |
Returns:
void
delete
Signature:
delete(start: number, end: number): void;
Parameters
Parameter | Type | Description |
---|---|---|
start | number | |
end | number |
Returns:
void
deleteInterval
Signature:
deleteInterval(serializedInterval: ISerializedInterval, local: boolean, op: ISequencedDocumentMessage): this;
Parameters
Parameter | Type | Description |
---|---|---|
serializedInterval | ISerializedInterval | |
local | boolean | |
op | ISequencedDocumentMessage |
Returns:
this
findOverlappingIntervals
Signature:
findOverlappingIntervals(startPosition: number, endPosition: number): TInterval[];
Parameters
Parameter | Type | Description |
---|---|---|
startPosition | number | |
endPosition | number |
Returns:
TInterval[]
map
Signature:
map(fn: (interval: TInterval) => void): void;
Parameters
Parameter | Type | Description |
---|---|---|
fn | (interval: TInterval) => void |
Returns:
void
nextInterval
Signature:
nextInterval(pos: number): TInterval;
Parameters
Parameter | Type | Description |
---|---|---|
pos | number |
Returns:
TInterval
on
Signature:
on(event: "addInterval" | "deleteInterval", listener: (interval: ISerializedInterval, local: boolean, op: ISequencedDocumentMessage) => void): this;
Parameters
Parameter | Type | Description |
---|---|---|
event | "addInterval" | "deleteInterval" | |
listener | (interval: ISerializedInterval, local: boolean, op: ISequencedDocumentMessage) => void |
Returns:
this
previousInterval
Signature:
previousInterval(pos: number): TInterval;
Parameters
Parameter | Type | Description |
---|---|---|
pos | number |
Returns:
TInterval
serializeInternal
Signature:
serializeInternal(): any[];
Returns:
any[]