source: node_modules/es-toolkit/dist/compat/object/update.d.mts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 581 bytes
Line 
1import { PropertyPath } from '../_internal/PropertyPath.mjs';
2
3/**
4 * Updates the value at the specified path of the given object using an updater function.
5 * If any part of the path does not exist, it will be created.
6 *
7 * @param {object} obj - The object to modify.
8 * @param {PropertyPath} path - The path of the property to update.
9 * @param {(value: any) => any} updater - The function to produce the updated value.
10 * @returns {any} - The modified object.
11 */
12declare function update(obj: object, path: PropertyPath, updater: (value: any) => any): any;
13
14export { update };
Note: See TracBrowser for help on using the repository browser.