Any hints on what the correct TypeScript definition for this would be? Basically a 5x5 matrix with empty strings.
const arr = Array(5).fill(Array(5).fill('', 0), 0)
What I tried so far is:
const arr: Array<Array<string>> = Array(5).fill(Array(5).fill('', 0), 0)
but I get Unsafe assignment of type any[] to a variable of type string[][].
One hint I have from VSCode (mouse over the Array definition) is this:
var Array: ArrayConstructor (arrayLength?: number | undefined) => any[] (+2 overloads)
Does this mean that using ArrayConstructor I need to find a way to define the return value?
Any help would be appreciated.