type CloneWithCustomizer = (value: T, key: number | string | undefined, object: any, stack: any) => R; /** * Creates a shallow clone of a value with customizer that returns a specific result type. * * @template T - The type of the value to clone. * @template R - The result type extending primitive types or objects. * @param {T} value - The value to clone. * @param {CloneWithCustomizer} customizer - The function to customize cloning. * @returns {R} Returns the cloned value. * * @example * const obj = { a: 1, b: 2 }; * const cloned = cloneWith(obj, (value) => { * if (typeof value === 'object') { * return JSON.parse(JSON.stringify(value)); * } * }); * // => { a: 1, b: 2 } */ declare function cloneWith(value: T, customizer: CloneWithCustomizer): R; /** * Creates a shallow clone of a value with optional customizer. * * @template T - The type of the value to clone. * @template R - The result type. * @param {T} value - The value to clone. * @param {CloneWithCustomizer} customizer - The function to customize cloning. * @returns {R | T} Returns the cloned value or the customized result. * * @example * const obj = { a: 1, b: 2 }; * const cloned = cloneWith(obj, (value) => { * if (typeof value === 'number') { * return value * 2; * } * }); * // => { a: 2, b: 4 } */ declare function cloneWith(value: T, customizer: CloneWithCustomizer): R | T; /** * Creates a shallow clone of a value. * * @template T - The type of the value to clone. * @param {T} value - The value to clone. * @returns {T} Returns the cloned value. * * @example * const obj = { a: 1, b: 2 }; * const cloned = cloneWith(obj); * // => { a: 1, b: 2 } */ declare function cloneWith(value: T): T; export { cloneWith };