index.d.ts 531 B

123456789101112131415
  1. import { AllGeoJSON } from "@turf/helpers";
  2. /**
  3. * Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'.
  4. * ~3-5x faster than the common JSON.parse + JSON.stringify combo method.
  5. *
  6. * @name clone
  7. * @param {GeoJSON} geojson GeoJSON Object
  8. * @returns {GeoJSON} cloned GeoJSON Object
  9. * @example
  10. * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]], {color: 'red'});
  11. *
  12. * var lineCloned = turf.clone(line);
  13. */
  14. declare function clone(geojson: AllGeoJSON): any;
  15. export default clone;