@agile-ts/multieditor
Version:
Simple Form Manager for UI-Frameworks
12 lines (11 loc) • 484 B
TypeScript
/**
* Updates a nested property at the specified path with the provided new value.
*
* Inspired by:
* https://stackoverflow.com/questions/18936915/dynamically-set-property-of-nested-object
*
* @param obj - Object in which the property is to be updated at the path.
* @param path - Path to the property to be updated in the specified object.
* @param value - New value
*/
export declare function updateNestedProperty(obj: Object, path: string | string[], value: any): Object;