Trilium Frontend API
    Preparing search index...

    Interface RangeCursor<T>

    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).

    interface RangeCursor<T> {
        from: number;
        rank: number;
        to: number;
        value: T;
        goto(pos: number): void;
        next(): void;
    }

    Type Parameters

    • T
    Index

    Properties

    Methods

    Properties

    from: number

    The next range's start position.

    rank: number

    The position of the set that this range comes from in the array of sets being iterated over.

    to: number

    The next end position.

    value: T

    The next range's value. Holds null when the cursor has reached its end.

    Methods

    • Jump the cursor to the given position.

      Parameters

      • pos: number

      Returns void

    • Move the iterator forward.

      Returns void