Utility TypeScript @ 2.0.0-beta.6
    Preparing search index...

    Type Alias TuplifyUnion<T, L, N>Internal

    TuplifyUnion: true extends N ? [] : [...TuplifyUnion<Exclude<T, L>>, L]

    Only to be used for this case where tuple order does not matter.

    From: https://stackoverflow.com/questions/55127004/how-to-transform-union-type-to-tuple-type

    Type Parameters

    • T
    • L = UnionToIntersection<T extends any ? () => T : never> extends () => infer R
          ? R
          : never
    • N = [T] extends [never] ? true : false