Today we discuss Tuple to Union
We already solved a similar challenge Making object out of tuple.
This one is useful when we need to extract elements type out of tuple.
Here we use
extends any as Generic Constrain to be able to call
T[number] without errors
All together in Playground with test cases
Have a wonderful day ☀️typescriptmedium