Files
turftracker/frontend/node_modules/@turf/clone/dist/js/index.d.ts
2026-04-09 13:19:47 -05:00

16 lines
531 B
TypeScript
Executable File

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