type Path = []> = T extends ReadonlyArray ? Path | Prefix : T extends Record ? PathsOfObject | Prefix : Prefix; type PathsOfObject> = { [K in keyof T]-?: Path; }[keyof T]; type ValueAtPath = TPath extends readonly [ infer Head extends keyof T, ...infer Rest ] ? ValueAtPath : T; /** * Sets the value at `path` of `object`. * * For simple cases where the path is only one level deep, prefer `set` instead. * * @param data - The target method. * @param path - The array of properties. * @param value - The value to set. * @signature * R.setPath(obj, path, value) * @example * R.setPath({ a: { b: 1 } }, ['a', 'b'], 2) // => { a: { b: 2 } } * @dataFirst * @category Object */ declare function setPath>(data: T, path: TPath, value: ValueAtPath): T; /** * Sets the value at `path` of `object`. * * @param path - The array of properties. * @param value - The value to set. * @signature * R.setPath(path, value)(obj) * @example * R.pipe({ a: { b: 1 } }, R.setPath(['a', 'b'], 2)) // { a: { b: 2 } } * @dataLast * @category Object */ declare function setPath, Value extends ValueAtPath>(path: TPath, value: Value): (data: T) => T; export { setPath };