functype - v2.2.0
    Preparing search index...

    Type Alias Flattened<A>

    Flattened: A extends string ? A : A extends Iterable<infer B> ? B : A

    What flatten yields for one element: an iterable's items, and anything else, including a string, as itself. That matches the runtime, which spreads arrays and other non-string iterables. Languages disagree on strings: Scala and Python split them into characters, JavaScript's flat keeps them whole.

    Type Parameters

    • A