As I delve into TypeScript, my focus is on mastering array destructuring within the arguments list.
While object destructuring is feasible using this method:
let foo = function({firstname, lastname}){...}
foo({
firstname: 'ralph',
lastname: 'lauren'
});
I am intrigued by the possibility of applying similar techniques to array destructuring which could be immensely beneficial for me, like so:
let bar = function([desc, opts, fn]){...}
bar([
'yes',
{},
function(){}
]);
Can array destructuring in TypeScript be achieved in a manner akin to this?