A range cursor is an object that moves to the next range every time you call `next` on it. Note that, unlike ES6 iterators, these start out pointing at the first element, so you should call `next` only after reading the first range (if any).
| 1486 | only after reading the first range (if any). |
| 1487 | */ |
| 1488 | interface RangeCursor<T> { |
| 1489 | /** |
| 1490 | Move the iterator forward. |
| 1491 | */ |
| 1492 | next(): void; |
| 1493 | /** |
| 1494 | Jump the cursor to the given position. |
| 1495 | */ |
| 1496 | goto(pos: number): void; |
| 1497 | /** |
| 1498 | The next range's value. Holds `null` when the cursor has reached |
| 1499 | its end. |
| 1500 | */ |
| 1501 | value: T | null; |
| 1502 | /** |
| 1503 | The next range's start position. |
| 1504 | */ |
| 1505 | from: number; |
| 1506 | /** |
| 1507 | The next end position. |
| 1508 | */ |
| 1509 | to: number; |
| 1510 | /** |
| 1511 | The position of the set that this range comes from in the array |
| 1512 | of sets being iterated over. |
| 1513 | */ |
| 1514 | rank: number; |
| 1515 | } |
| 1516 | type RangeSetUpdate<T extends RangeValue> = { |
| 1517 | /** |
| 1518 | An array of ranges to add. If given, this should be sorted by |
no outgoing calls
no test coverage detected