Documentation
    Preparing search index...

    Type Alias Flatten<A>

    Flatten: A extends readonly (infer I)[] ? I : never

    The Flatten type takes an array type and returns the type of the elements in the array. It uses conditional types and type inference to achieve this. If A is an array of some type I, it returns I. If A is not an array, it returns never.

    Type Parameters

    • A extends readonly unknown[]