import { ObjBase, Paths, Prop, ReplaceType } from '../typings/types'; interface PathSetBy { , R>(path: [K], fn: ObjBase, obj: O): ReplaceType; (path: [K], fn: ObjBase): (obj: O) => ReplaceType; (path: [K]): { , R>(fn: ObjBase, obj: O): ReplaceType; (fn: ObjBase): (obj: O) => ReplaceType; }; (path: Paths, fn: ObjBase, obj: O): O; (path: Paths, fn: ObjBase): (obj: O) => O; (path: Paths): { (fn: ObjBase, obj: O): O; (fn: ObjBase): (obj: O) => O; }; } /** * Returns the result of "setting" the portion of the given data structure * focused by the given paths to 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]} paths * @param {Function} fn * @param {Object} obj * @return {Object} * @example * * pathSetBy(['a', 'b'], x => x+1, {a: { b:1 }}) // => { a: { b: 2 } } */ declare const _default: PathSetBy; export default _default;