mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-21 19:40:34 +00:00
maps: drop indexHitsOnly, which the search no longer needs, and keep isHit inside its module
This commit is contained in:
@@ -57,7 +57,7 @@ export function searchRecord(item: NominatimResult) {
|
||||
};
|
||||
}
|
||||
|
||||
export function isHit(hit: NominatimResult | null): hit is NominatimResult {
|
||||
function isHit(hit: NominatimResult | null): hit is NominatimResult {
|
||||
return hit !== null;
|
||||
}
|
||||
|
||||
|
||||
@@ -396,11 +396,6 @@ export async function trekPlacesSearch(
|
||||
return Array.isArray(body.results) ? body.results.map(withLocality) : [];
|
||||
}
|
||||
|
||||
/** The index-only rows of a mixed result, for callers that need Overture fields. */
|
||||
export function indexHitsOnly(hits: TrekSearchHit[]): TrekPlace[] {
|
||||
return hits.filter((h): h is TrekPlace => !isOsmHit(h));
|
||||
}
|
||||
|
||||
/**
|
||||
* The planner's category pills, mapped onto Overture categories.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user