index.d.ts 725 B

123456789101112131415161718192021222324252627
  1. import {
  2. Point,
  3. MultiPoint,
  4. LineString,
  5. MultiLineString,
  6. Polygon,
  7. MultiPolygon,
  8. Feature,
  9. FeatureCollection,
  10. AllGeoJSON,
  11. } from "@turf/helpers";
  12. /**
  13. * http://turfjs.org/docs/#flatten
  14. */
  15. declare function flatten<T extends Point | MultiPoint>(
  16. geojson: Feature<T> | FeatureCollection<T> | T
  17. ): FeatureCollection<Point>;
  18. declare function flatten<T extends LineString | MultiLineString>(
  19. geojson: Feature<T> | FeatureCollection<T> | T
  20. ): FeatureCollection<LineString>;
  21. declare function flatten<T extends Polygon | MultiPolygon>(
  22. geojson: Feature<T> | FeatureCollection<T> | T
  23. ): FeatureCollection<Polygon>;
  24. declare function flatten(geojson: AllGeoJSON): FeatureCollection<any>;
  25. export default flatten;