es-stl - v3.0.2
    Preparing search index...

    Interface SearchRangeCallback<T>

    Callback that exposes an element's searchable range.

    Write inclusive lower and upper bounds into the provided range array. The array is reused by search helpers to avoid allocating a new tuple for each inspected item.

    const getRange: SearchRangeCallback<{ start: number; end: number }> = (
    range,
    item
    ) => {
    range[0] = item.start;
    range[1] = item.end;
    };

    Type Parameters

    • T

      Range element type.

    • Writes the element's inclusive range bounds into range.

      Parameters

      • range: number[]

        Mutable two-item array receiving [start, end].

      • el: T

        Element being inspected.

      • i: number

        Element index.

      Returns void