-
Notifications
You must be signed in to change notification settings - Fork 3
/
vendors.d.ts
31 lines (28 loc) · 1.13 KB
/
vendors.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
declare module 'next-react-memory-stats'
declare module '@mapbox/tilebelt'
declare module '@globalfishingwatch/maplibre-gl/dist/style-spec'
// Remove once this is merged: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/67548
declare module 'geo-coordinates-parser' {
export interface ToFormats {
DMS: 'DMS'
DM: 'DM'
DD: 'DD'
}
export interface ConvertResponse {
decimalLatitude: number
decimalLongitude: number
decimalCoordinates: string
verbatimLatitude: string
verbatimLongitude: string
verbatimCoordinates: string
closeEnough: (coordinates: string) => boolean
toCoordinateFormat: (format: ToFormats) => string
}
/**
* Function for converting coordinates in a variety of formats to decimal coordinates
* @param {string} coordsString The coordinates string to convert
* @param {number} decimalPlaces The number of decimal places for converted coordinates; default is 5
* @returns {ConverterResponse} { verbatimCoordinates, decimalCoordinates, decimalLatitude, decimalLongitude }
*/
export function convert(coordsString: string, decimalPlaces?: number): ConvertResponse
}