diff --git a/src/orderByDistance.ts b/src/orderByDistance.ts index 65bb80f..3b55c87 100644 --- a/src/orderByDistance.ts +++ b/src/orderByDistance.ts @@ -7,9 +7,9 @@ type DistanceFn = ( ) => number; // Sorts an array of coords by distance from a reference coordinate -const orderByDistance = ( +const orderByDistance = ( point: GeolibInputCoordinates, - coords: GeolibInputCoordinates[], + coords: T[], distanceFn: DistanceFn = getDistance ) => { distanceFn = typeof distanceFn === 'function' ? distanceFn : getDistance;