Trilium Frontend API
    Preparing search index...

    Interface RangeComparator<T>

    Collection of methods used when comparing range sets.

    interface RangeComparator<T extends RangeValue> {
        boundChange?(pos: number): void;
        comparePoint(from: number, to: number, pointA: T, pointB: T): void;
        compareRange(from: number, to: number, activeA: T[], activeB: T[]): void;
    }

    Type Parameters

    Index

    Methods

    • Notification for a changed boundary between ranges. For example, if the same span is covered by two partial ranges before and one bigger range after, this is called at the point where the ranges used to be split.

      Parameters

      • pos: number

      Returns void

    • Notification for a changed (or inserted, or deleted) point range.

      Parameters

      • from: number
      • to: number
      • pointA: T
      • pointB: T

      Returns void

    • Notifies the comparator that a range (in positions in the new document) has the given sets of values associated with it, which are different in the old (A) and new (B) sets.

      Parameters

      • from: number
      • to: number
      • activeA: T[]
      • activeB: T[]

      Returns void