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

    1.1.0 • 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

    // 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.

    Keywords

    none

    Install

    npm i @types/formatcoords

    DownloadsWeekly Downloads

    155

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    5.04 kB

    Total Files

    4

    Last publish

    Collaborators

    • types