import { orderByWithFractionalIndexBase } from './orderBy.js' import { topKWithFractionalIndexBTree } from './topKWithFractionalIndexBTree.js' import type { KeyValue } from '../types.js' import type { OrderByOptions } from './orderBy.js' export function orderByWithFractionalIndexBTree< T extends KeyValue, Ve = unknown, >( valueExtractor: ( value: T extends KeyValue ? V : never, ) => Ve, options?: OrderByOptions, ) { return orderByWithFractionalIndexBase( topKWithFractionalIndexBTree, valueExtractor, options, ) }