Type alias TupleUnion<U, R>

TupleUnion<U, R>: {
    [S in U]: Exclude<U, S> extends never
        ? [...R, S]
        : TupleUnion<Exclude<U, S>, [...R, S]>
}[U] & string[]

Type Parameters

  • U extends string
  • R extends string[] = []