UNPKG

@storm-stack/utilities

Version:

This package includes various base utility class and various functions to assist in the development process.

11 lines (10 loc) 472 B
import { DeepKey } from "@storm-stack/types"; /** * Sets a value at a given deep path in an object. * * @param object - The object to set the value in. * @param path - The deep path to set the value at. * @param value - The value to set. * @returns The object with the value set at the given deep path. */ export declare function setField<TObject extends Record<string, any> = Record<string, any>>(object: TObject, path: DeepKey<TObject>, value: unknown): TObject;