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