questions/03243-medium-flattendepth/README.md
Recursively flatten array up to depth times.
For example:
type a = FlattenDepth<[1, 2, [3, 4], [[[5]]]], 2> // [1, 2, 3, 4, [5]]. flattern 2 times
type b = FlattenDepth<[1, 2, [3, 4], [[[5]]]]> // [1, 2, 3, 4, [[5]]]. Depth defaults to be 1
If the depth is provided, it's guaranteed to be positive integer.
<!--info-footer-start--><a href="../../README.md" target="_blank"></a> <a href="https://tsch.js.org/3243/answer" target="_blank"></a> <a href="https://tsch.js.org/3243/solutions" target="_blank"></a> <hr><h3>Related Challenges</h3><a href="https://github.com/type-challenges/type-challenges/blob/main/questions/00459-medium-flatten/README.md" target="_blank"></a> <!--info-footer-end-->