IntervalIndex Interface
Collection of intervals.
Implementers of this interface will typically implement additional APIs to support efficiently querying a collection of intervals in some manner, for example: - "find all intervals with start endpoint between these two points" - "find all intervals which overlap this range" etc.
To use, import via @fluidframework/sequence/legacy
.
For more information about our API support guarantees, see here.
Signature
export interface IntervalIndex<TInterval extends ISerializableInterval>
Type Parameters
Parameter | Constraint | Description |
---|---|---|
TInterval | ISerializableInterval |
Methods
Method | Alerts | Return Type | Description |
---|---|---|---|
add(interval) | Alpha |
void | Adds an interval to the index. |
remove(interval) | Alpha |
void | Removes an interval from the index. |
Method Details
add
Adds an interval to the index.
To use, import via @fluidframework/sequence/alpha
.
For more information about our API support guarantees, see here.
Signature
add(interval: TInterval): void;
Remarks
Application code should never need to invoke this method on their index for production scenarios: Fluid handles adding and removing intervals from an index in response to sequence or interval changes.
Parameters
Parameter | Type | Description |
---|---|---|
interval | TInterval |
remove
Removes an interval from the index.
To use, import via @fluidframework/sequence/alpha
.
For more information about our API support guarantees, see here.
Signature
remove(interval: TInterval): void;
Remarks
Application code should never need to invoke this method on their index for production scenarios: Fluid handles adding and removing intervals from an index in response to sequence or interval changes.
Parameters
Parameter | Type | Description |
---|---|---|
interval | TInterval |