typescript spread operator for object code example
Example: spread operator in ts
function foo(...x: number[]) {
console.log(JSON.stringify(x));
}
var args:number[] = [0, 1, 2];
foo(...args);
function foo(...x: number[]) {
console.log(JSON.stringify(x));
}
var args:number[] = [0, 1, 2];
foo(...args);