import type { AlgoliaHit } from '../../types'; export function addAbsolutePosition( hits: THit[], page: number, hitsPerPage: number ): Array { return hits.map((hit, idx) => ({ ...hit, __position: hitsPerPage * page + idx + 1, })); }