by Julian Coy @eXamadeus
How can we build a type that "unboxes" arrays, functions, promises, and tuples?
Example:
Unbox<string> // string
Unbox<()=>number> // number
Unbox<boolean[]> // boolean
Unbox<Promise<boolean>> // boolean
Bonus: Can we make it recursive?
Unbox<() => () => () => () => number> // number
Double Bonus: Can we control the recursion?
Unbox<() => () => () => () => number, 3> // () => number