utilitypes-ts
    Preparing search index...

    Type Alias DeepArray<T>

    DeepArray: (T | DeepArray<T>)[]

    Recursively defines an array of T where elements can be nested arrays of arbitrary depth.

    Type Parameters

    • T

      The element type

    const a: DeepArray<string> = ["a", "b"];
    const b: DeepArray<string> = ["a", ["b", "c", []], [["d"]]];