UNPKG

typicalcrimes

Version:
30 lines (29 loc) 1.1 kB
export declare type FormatCoordsDataTypeInput = string | number | null | undefined; export declare type FormatCoordsOptions = { lat?: FormatCoordsDataTypeInput; lon?: FormatCoordsDataTypeInput; } | { lat?: FormatCoordsDataTypeInput; lng?: FormatCoordsDataTypeInput; } | { latitude?: FormatCoordsDataTypeInput; longitude?: FormatCoordsDataTypeInput; } | [FormatCoordsDataTypeInput, FormatCoordsDataTypeInput]; export declare function format(coords?: null | FormatCoordsOptions): { latitude: number; longitude: number; }; export declare function isValid(coords: number[]): boolean; export declare function toLatLon(coords: null | FormatCoordsOptions): null | { lat: number; lon: number; }; export declare function toLatLng(coords: null | FormatCoordsOptions): null | { lat: number; lng: number; }; export declare function toNative(coords: null | FormatCoordsOptions): null | { latitude: number; longitude: number; }; export declare function toPigeon(coords: null | FormatCoordsOptions): [number | null, number | null];