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

    0.5.4 • Public • Published

    Installation

    npm install --save @types/wellknown

    Summary

    This package contains type definitions for wellknown (https://github.com/mapbox/wellknown#readme).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/wellknown.

    index.d.ts

    // Type definitions for wellknown 0.5
    // Project: https://github.com/mapbox/wellknown#readme
    // Definitions by: Davide Scalzo <https://github.com/davodesign84>
    //                 Yair Tawil <https://github.com/yairtawil>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    export type GeoJSONPosition = [number, number] | [number, number, number];
    
    export interface Geometry<T, C> {
        type: T;
        coordinates: C;
    }
    
    export interface GeoJSONGeometryCollection {
        type: "GeometryCollection";
        geometries: GeoJSONGeometry[];
    }
    
    export type GeoJSONPoint = Geometry<"Point", GeoJSONPosition>;
    export type GeoJSONMultiPoint = Geometry<"MultiPoint", GeoJSONPosition[]>;
    
    export type GeoJSONLineString = Geometry<"LineString", GeoJSONPosition[]>;
    
    export type GeoJSONMultiLineString = Geometry<"MultiLineString", GeoJSONPosition[][]>;
    
    export type GeoJSONPolygon = Geometry<"Polygon", GeoJSONPosition[][]>;
    
    export type GeoJSONMultiPolygon = Geometry<"MultiPolygon", GeoJSONPosition[][][]>;
    
    export type GeoJSONGeometry =
        | GeoJSONPoint
        | GeoJSONMultiPoint
        | GeoJSONLineString
        | GeoJSONMultiLineString
        | GeoJSONPolygon
        | GeoJSONMultiPolygon
        | GeoJSONGeometryCollection;
    
    export type GeoJSONGeometryOrNull = GeoJSONGeometry | null;
    
    export interface GeoJSONFeature {
        type: 'Feature';
        geometry: GeoJSONGeometry;
    }
    
    export function parse(input: string): GeoJSONGeometryOrNull;
    export function stringify(gj: GeoJSONGeometry | GeoJSONFeature): string;

    Additional Details

    • Last updated: Mon, 14 Nov 2022 17:03:07 GMT
    • Dependencies: none
    • Global values: none

    Credits

    These definitions were written by Davide Scalzo, and Yair Tawil.

    Keywords

    none

    Install

    npm i @types/wellknown

    DownloadsWeekly Downloads

    27,692

    Version

    0.5.4

    License

    MIT

    Unpacked Size

    5.77 kB

    Total Files

    5

    Last publish

    Collaborators

    • types