diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..592b71c --- /dev/null +++ b/index.d.ts @@ -0,0 +1,20 @@ +declare module 'formatcoords' { + interface FormatOptions { + latLonSeparator?: string + decimalPlaces?: number + } + + interface Formatcoords { + format(format?: string, options?: FormatOptions): string + } + + function init( + [lat, lng]: [number, number], + flipLonLat?: boolean, + ): Formatcoords + function init(lat: number, lng: number, flipLonLat?: boolean): Formatcoords + function init(latlng: string): Formatcoords + function init({ lat, lng }: { lat: number; lng: number }): Formatcoords + + export default init +}