export type TGetObjWithoutUndefinedArgs = Parameters; export type TGetObjWithoutUndefinedReturn = ReturnType; type TObjectWithoutUndefined = { [TKey in keyof T as T[TKey] extends undefined ? never : TKey]: Exclude; }; /** * Creates a shallow copy without own properties whose value is `undefined`. * @template T * @param {T} obj Source object * @returns {TObjectWithoutUndefined} Object with defined values * @throws {TypeError} getObjWithoutUndefined: obj must be a plain object * @example * getObjWithoutUndefined({ id: 1, name: undefined }); // { id: 1 } * @example * // Build a PATCH payload while preserving intentional null values * const payload = getObjWithoutUndefined({ name, avatar: null, phone: undefined }); * // `phone` is removed, while `avatar` remains null */ export declare const getObjWithoutUndefined: (obj: T) => TObjectWithoutUndefined; export {};