@mapbox/geojson-types

@mapbox/geojson-types JS library on npm Download @mapbox/geojson-types JS library

Flow type declarations for [GeoJSON](https://tools.ietf.org/html/rfc7946).

Version 1.0.2 License ISC
@mapbox/geojson-types has no homepage
@mapbox/geojson-types JS library on GitHub
@mapbox/geojson-types JS library on npm
Download @mapbox/geojson-types JS library

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) {
    // ...
}