File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -689,9 +689,9 @@ export function concatenate<T>(array1: readonly T[] | undefined, array2: readonl
689
689
export function concatenate < T > ( array1 : readonly T [ ] | undefined , array2 : readonly T [ ] | undefined ) : readonly T [ ] | undefined {
690
690
if ( array2 === undefined || array2 . length === 0 ) return array1 ;
691
691
if ( array1 === undefined || array1 . length === 0 ) return array2 ;
692
- const result : T [ ] = [ ] ;
693
- for ( let i = 0 ; i < array1 . length ; i ++ ) result . push ( array1 [ i ] ) ;
694
- for ( let i = 0 ; i < array2 . length ; i ++ ) result . push ( array2 [ i ] ) ;
692
+ let result : T [ ] | undefined ;
693
+ for ( let i = 0 ; i < array1 . length ; i ++ ) result = append ( result , array1 [ i ] ) ;
694
+ for ( let i = 0 ; i < array2 . length ; i ++ ) result = append ( result , array2 [ i ] ) ;
695
695
return result ;
696
696
}
697
697
You can’t perform that action at this time.
0 commit comments