Projection used by binary search helpers.
The projected value must be sorted in ascending order across the searched array.
const getOffset: SearchCallback<{ offset: number }> = (entry) => entry.offset; Copy
const getOffset: SearchCallback<{ offset: number }> = (entry) => entry.offset;
Searched element type.
Projects an element to a searchable numeric value.
Element being inspected.
Element index.
Numeric value used for binary-search comparisons.
Projection used by binary search helpers.
Remarks
The projected value must be sorted in ascending order across the searched array.
Example