If I have a tuple how can I set it to a function for the input arguments?
type addArgs = [number, number]
const add = (a, b): number => {
return a + b;
}
I tried something like this but it does not work:
type addArgs = [number, number]
const add = (...[a, b]: addArgs): number => {
return a + b;
}