Represents an array that can be nested to an arbitrary depth.
This structure is commonly used when dealing with recursive data or flat-map operations.
The type of the leaf values found within the structure.
const flat: NestedArray<number> = [1, 2, 3];const deep: NestedArray<number> = [1, [2, [3, 4]], 5]; Copy
const flat: NestedArray<number> = [1, 2, 3];const deep: NestedArray<number> = [1, [2, [3, 4]], 5];
Represents an array that can be nested to an arbitrary depth.
This structure is commonly used when dealing with recursive data or flat-map operations.