import { Prop, ReplaceType } from '../typings/types'; interface PropSet { (prop: K, val: V, obj: O): ReplaceType; (prop: K, val: V): (obj: O) => ReplaceType; (prop: K): { (val: V, obj: O): ReplaceType; (val: V): (obj: O) => ReplaceType; }; } /** * Makes a shallow clone of an object, setting or overriding the specified * property with the given value. All non-primitive properties are * copied by reference. * * **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 {*} val The new value * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original except for the changed property. * @example * * propSet('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3} */ declare const _default: PropSet; export default _default;