I want describe some data as where a value in the array could be another array of numbers, this is done indefinitely so the types should be recursive.
With the following code I receive an error
Type 'number' is not assignable to type 'Data'
type Data = ReadonlyArray<number> | Data; const data: Data = [1, 2, 3, [4, 5, [6, 7]]];
How to fix it using the latest TypeScript?