import type { AlgoliaHit } from '../../types'; export function addQueryID( hits: THit[], queryID?: string ): Array { if (!queryID) { return hits; } return hits.map((hit) => ({ ...hit, __queryID: queryID, })); }