import { Prop, ReplaceType, ObjBase } from '../typings/types'; interface PropSetBy { , R>(prop: K, fn: ObjBase, obj: O): ReplaceType; (prop: K, fn: ObjBase): (obj: O) => ReplaceType; (prop: K): { , R>(fn: ObjBase, obj: O): ReplaceType; (fn: ObjBase): (obj: O) => ReplaceType; }; } /** * Makes a shallow clone of an object, setting or overriding the specified * property with the result of `fn` call. * * **Note:** If property in the object is equal to value by reference then function * just returns object without changes * * @param {String} prop The property name to set * @param {Function} fn The function to execute * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original except for the changed property. * @example * * propSetBy('a', x => x+1, {a: 1}); //=> {a: 2} */ declare const _default: PropSetBy; export default _default;