IInterval Interface
Basic interval abstraction \
To use, import via @fluidframework/sequence/legacy.
For more information about our API support guarantees, see here.
Signature
export interface IInterval
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| compare(b) | Beta |
number | Compares this interval to b with standard comparator semantics: - returns -1 if this is less than b - returns 1 if this is greater than b - returns 0 if this is equivalent to b |
| compareEnd(b) | Beta |
number | Compares the end endpoint of this interval to b's end endpoint. Standard comparator semantics apply. |
| compareStart(b) | Beta |
number | Compares the start endpoint of this interval to b's start endpoint. Standard comparator semantics apply. |
| overlaps(b) | Beta |
boolean |
Method Details
compare
Compares this interval to b with standard comparator semantics: - returns -1 if this is less than b - returns 1 if this is greater than b - returns 0 if this is equivalent to b
For more information about our API support guarantees, see here.
Signature
compare(b: IInterval): number;
Parameters
| Parameter | Type | Description |
|---|---|---|
| b | IInterval | Interval to compare against |
Returns
Return type: number
compareEnd
Compares the end endpoint of this interval to b's end endpoint. Standard comparator semantics apply.
For more information about our API support guarantees, see here.
Signature
compareEnd(b: IInterval): number;
Parameters
| Parameter | Type | Description |
|---|---|---|
| b | IInterval | Interval to compare against |
Returns
Return type: number
compareStart
Compares the start endpoint of this interval to b's start endpoint. Standard comparator semantics apply.
For more information about our API support guarantees, see here.
Signature
compareStart(b: IInterval): number;
Parameters
| Parameter | Type | Description |
|---|---|---|
| b | IInterval | Interval to compare against |
Returns
Return type: number
overlaps
For more information about our API support guarantees, see here.
Signature
overlaps(b: IInterval): boolean;
Parameters
| Parameter | Type | Description |
|---|---|---|
| b | IInterval |
Returns
whether this interval overlaps with b. Intervals are considered to overlap if their intersection is non-empty.
Return type: boolean