Check out example codes for "spread operator in ts". It will help you in understanding the concepts better.

Code Example 1

function foo(...x: number[]) { 
 console.log(JSON.stringify(x));
}
var args:number[] = [0, 1, 2];

foo(...args);

Learn ReactJs, React Native from akashmittal.com