@saashub/qoq-utils
Version:
14 lines (13 loc) • 461 B
TypeScript
export type TObjectType = object & {
length?: never;
};
/**
* Method merges objects and tries to clone them with `structuredClone`
* Object on the right have precedence in every key, and If key is set to 'undefined'
* it will be removed from object on the left.
*
* @param first input object
* @param args input objects
* @returns merged object
*/
export declare function objectMergeRight<T extends TObjectType>(first: T, ...args: Partial<T>[]): T;