export const utilMergeDeep = ( baseObject , newObject ) => { const target = { } ; const internalMerger = ( obj ) => { for ( const prop in obj ) { if ( obj . hasOwnProperty ( prop ) ) { if ( Object . prototype . toString . call ( obj [ prop ] ) === "[object Object]" ) { target [ prop ] = utilMergeDeep ( target [ prop ] as Record < any , any > , obj [ prop ] ) ; } else { target [ prop ] = obj [ prop ] ; } } } } ; internalMerger ( baseObject ) ; internalMerger ( newObject ) ; return target ; } ;