UNPKG

399 BTypeScriptView Raw
1export interface Indexable {
2 [key: string]: any;
3}
4/**
5 * Returns a deeply merged object with properties from the 2 provided objects
6 * @remarks - Only deeply merge objects. The second argument overrides the
7 * first if it is provided as `null`, `undefined` or an array.
8 * @public
9 * */
10export default function mergeProps<T extends Indexable, T2 extends Indexable>(obj: T, newObj: T2): T | T2;