@mapbox/geojson-types
v1.0.2
Published
Flow type declarations for [GeoJSON](https://tools.ietf.org/html/rfc7946).
Downloads
2,162,678
Maintainers
Keywords
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) {
// ...
}