JSPM

@mapbox/geojson-types

1.0.2
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 275184
    • Score
      100M100P100Q185374F
    • License ISC

    Package Exports

    • @mapbox/geojson-types

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mapbox/geojson-types) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    geojson-types

    Flow type declarations for GeoJSON.

    Install

    npm install @mapbox/geojson-types

    Use

    // @flow
    
    import type {
        GeoJSONFeatureCollection,
        GeoJSONFeature,
    
        // specific geometries
        GeoJSONPoint,
        GeoJSONLineString,
        GeoJSONPolygon,
        GeoJSONMultiPoint,
        GeoJSONMultiLineString,
        GeoJSONMultiPolygon,
    
        // any geometry
        GeoJSONGeometry,
    
        // any feature collection, feature, or geometry
        GeoJSON,
    } from '@mapbox/geojson-types';
    
    function doSomething(data: GeoJSON) {
        // ...
    }