example export function assignTwoLevelsDeep < TObject , T > ( _dest , ... args ) { const dest = _dest as TObject & T ; for ( const arg of args ) { for ( const [ key , value ] of Object . entries ( arg ?? { } ) as Array < [ keyof T , T [ keyof T ] ] > ) { dest [ key ] = { ... dest [ key ] , ... value } ; } } return dest ; }