@types/formatcoords
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

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

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: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Vít Stanislav.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/formatcoords

Weekly Downloads

4,467

Version

1.1.2

License

MIT

Unpacked Size

4.57 kB

Total Files

5

Last publish

Collaborators

  • types