/**
 * Provides a utility method for deeply cloning objects with properties that are computed or have their own `clone()` method, such as
 * [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html).
 *
 * @since 4.0
 */

/**
 * Use this method to deeply clone objects with properties that are computed or have their own `clone()` method.
 * For example, if you are creating an object that stores an initial extent and a spatial reference
 * for your application, you can use `esriLang.clone(initialProps)` to clone this object so that the `extent`
 * and `spatialReference` are properly cloned.
 *
 * @param elem - The object to be cloned.
 * @returns A clone of the object.
 * @example
 * const esriLang = await $arcgis.import("@arcgis/core/core/lang.js");
 * let initialProps = {
 *   extent: appExtent, // app initial extent
 *   spatialReference: spatReference // app spatialReference
 * };
 * // Creates a deep clone of the object
 * let clonedInitialProps = esriLang.clone(initialProps);
 */
export function clone<T>(elem: T): T;