Trilium Frontend API
    Preparing search index...

    Type Alias RangeSetUpdate<T>

    type RangeSetUpdate<T extends RangeValue> = {
        add?: readonly Range<T>[];
        filter?: (from: number, to: number, value: T) => boolean;
        filterFrom?: number;
        filterTo?: number;
        sort?: boolean;
    }

    Type Parameters

    Index

    Properties

    add?: readonly Range<T>[]

    An array of ranges to add. If given, this should be sorted by from position and startSide unless sort is given as true.

    filter?: (from: number, to: number, value: T) => boolean

    Filter the ranges already in the set. Only those for which this function returns true are kept.

    filterFrom?: number

    Can be used to limit the range on which the filter is applied. Filtering only a small range, as opposed to the entire set, can make updates cheaper.

    filterTo?: number

    The end position to apply the filter to.

    sort?: boolean

    Indicates whether the library should sort the ranges in add. Defaults to false.