see https export function assign < T , U > ( target , source ) ; export function assign < T , U , V > ( target , source1 , source2 ) ; export function assign ( target , ... sources ) ; export function assign ( target , ... args ) { for ( let i = 0 ; i < args . length ; i ++ ) { let source = args [ i ] ; for ( let key in source ) { if ( source . hasOwnProperty ( key ) ) { target [ key ] = source [ key ] ; } } } return target ; }