import { UpsertProp } from "../node_modules/.pnpm/remeda@2.39.0_patch_hash_e9e98c19bf4c5844450bf78de4493bf242de2fdb7c7ecf7ee2313945578d9b68/node_modules/remeda/dist/index.mjs"; //#region src/object/object-upsert-property.d.ts /** * Returns a new object equal to `object` but with `key` set to `value` — * inserting the property if it is absent or overwriting it if present (an * upsert). The original is not mutated. * * The result type is computed precisely: adding a new literal key widens the * type to include it, and overwriting an existing key updates that key's type to * `value`'s type. * @param object - The source object. Not mutated. * @param key - The property key to insert or overwrite. * @param value - The value to set at `key`. * @returns A new object with `key` set to `value`. * @example * // Insert a new key * objectUpsertProperty({a: 1}, 'b', 2); * // {a: 1, b: 2} * @example * // Overwrite an existing key (its type updates to the new value's type) * objectUpsertProperty({a: 1}, 'a', 'now a string'); * // {a: 'now a string'} */ declare const objectUpsertProperty: (object: T, key: K, value: V) => UpsertProp; //#endregion export { objectUpsertProperty };