1.1.2 • Published 2 years ago
@types/formatcoords v1.1.2
Installation
npm install --save @types/formatcoords
Summary
This package contains type definitions for formatcoords (https://github.com/nerik/formatcoords).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/formatcoords.
index.d.ts
// Type definitions for formatcoords 1.1
// Project: https://github.com/nerik/formatcoords
// Definitions by: Vít Stanislav <https://github.com/slaweet>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface CoordsFormatOptions {
latLonSeparator?: string;
decimalPlaces?: number;
}
declare function format(options?: CoordsFormatOptions): string;
declare function format(formatString?: string, options?: CoordsFormatOptions): string;
declare function format(formatString: string, latLonSeparator: string): string;
interface LonLatValues {
initValue: number;
degrees: number;
degreesInt: number;
degreesFrac: number;
secondsTotal: number;
minutes: number;
minutesInt: number;
seconds: number;
}
interface CoordsObject {
format: typeof format;
north: boolean;
east: boolean;
latValues: LonLatValues;
lonValues: LonLatValues;
}
declare function formatcoords(lat: number, lon?: number, latlonSwapped?: boolean): CoordsObject;
declare function formatcoords([lat, lon]: [number, number], latlonSwapped?: boolean): CoordsObject;
declare function formatcoords(coords: string | { lat: number; lng: number }): CoordsObject;
export = formatcoords;
Additional Details
- Last updated: Wed, 01 Dec 2021 17:31:08 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Vít Stanislav.