For a multidimensional array whose every element has the same type, it's simple to declare: string[][]
.
However if each array is different, then how should I do?
function create3DArray(arg): // <----???
{ firstArray: string[] = []
secondArray: number[] = []
thirdArray: CustomType[] = []
return [firstArray, secondArray, thirdArray]
}
I have looked at typescript multidimensional array with different types but I'm still not sure how to do it.