export class ObjectUtils { private constructor ( ) { } static clone < T > ( obj ) { if ( obj == null ) return undefined as any as T ; if ( obj instanceof Array ) return cloneArray ( obj ) as any as T ; return ObjectUtils . assign ( { } , obj ) ; function cloneArray ( a ) { return a . map ( item => ObjectUtils . clone ( item ) ) ; } } static assign < T , U > ( a , b ) ; static assign < T , U , V > ( a , b , c ) ; static assign < T , U , V > ( a , b , c ? ) { if ( Object . assign != null ) { if ( c == null ) return Object . assign < T , U > ( a , b ) ; else return Object . assign < T , U , V > ( a , b , c ) ; } if ( c == null ) return this . es5Assign ( a , b ) ; else return this . es5Assign ( a , b , c ) ; } private static es5Assign < T , U > ( a , b ) ; private static es5Assign < T , U , V > ( a , b , c ) ; private static es5Assign < T , U , V > ( a , b , c ? ) { const to = Object ( a ) ; for ( let index = 1 ; index < arguments . length ; index ++ ) { const nextSource = arguments [ index ] ; if ( nextSource == null ) continue ; for ( const nextKey in nextSource ) { if ( Object . prototype . hasOwnProperty . call ( nextSource , nextKey ) ) to [ nextKey ] = nextSource [ nextKey ] ; } } return to ; } }