manuelbieh / geolib

Zero dependency library to provide some basic geo functions
MIT License
4.21k stars 341 forks source link

Refine `findNearest` type declaration #152

Closed musou1500 closed 5 years ago

musou1500 commented 6 years ago

I think

here is a new declaration.

function findNearest(
  latlng: PositionAsDecimal,
  coords: PositionAsDecimal[] | { [key: string]: PositionAsDecimal },
  offset?: number,
  limit?: number
): Distance[] | Distance;

I can send PR, but please help me if you have a better idea.

rodrigoords commented 6 years ago

Any news ?

musou1500 commented 6 years ago

@rodrigoords nothing....this repository may not be maintained.

manuelbieh commented 5 years ago

This is fixed in v3, which is completely written in TypeScript and will be released shortly.