Type Alias FlattenArray<A, D>

FlattenArray<A, D>: A extends (infer U)[]
    ? Member<Exclude<U, A>, D>[]
    : A extends unknown[]
        ? {
            [K in keyof A]: Member<A[K], D>
        }
        : A

Flattens an array

Type Parameters

  • A extends unknown[]
  • D = null