z-util-page
Version:
20 lines (19 loc) • 534 B
TypeScript
/**
* 深度合并n个对象值
* @category 辅助函数
* @example
* ```ts
* const a = { a: 1, b: { c: 2 } };
* const b = { b: { d: 3 } };
* const c = { c: 4 };
* mergeObject(a, b, c);
* ```
* @param origin 将多个对象深度合并到该对象
* @param ob 被合并对象
* @param more 其余被合并对象
*/
export declare function mergeObject<T extends StandardObject>(origin: T, ob: StandardObject | undefined, ...more: Array<StandardObject>): T;
interface StandardObject {
[name: string]: any;
}
export {};