I am working on a function that takes in a specific type structure:
type Input = [Array<string>, Array<number>, Array<boolean>];
It then transforms and outputs the data in this format:
Array<[string, number, boolean]>
This essentially flattens the nested array into a single array.
I'm trying to figure out how I can achieve this using generics. Currently, my function signature looks like this:
function foo<T extends Array<Array<unknown>>>(arrays: T) {
}
I believe I need to apply some kind of transformation to the generic type 'T'. What would be the correct transformation to implement?