index.d.cts 784 B

123456789101112131415161718192021222324252627282930
  1. import { Feature, GeometryObject, Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, FeatureCollection, GeometryCollection } from 'geojson';
  2. import { Units } from '@turf/helpers';
  3. interface Options {
  4. units?: Units;
  5. steps?: number;
  6. }
  7. /**
  8. * http://turfjs.org/docs/#buffer
  9. */
  10. declare function buffer(
  11. feature:
  12. | Feature<GeometryObject>
  13. | Point
  14. | LineString
  15. | Polygon
  16. | MultiPoint
  17. | MultiLineString
  18. | MultiPolygon,
  19. radius?: number,
  20. options?: Options
  21. ): Feature<Polygon | MultiPolygon> | undefined;
  22. declare function buffer(
  23. feature: FeatureCollection<GeometryObject> | GeometryCollection,
  24. radius?: number,
  25. options?: Options
  26. ): FeatureCollection<Polygon | MultiPolygon> | undefined;
  27. export { buffer, buffer as default };