Another way of saying what you want to do is to get the UnionAll type if it exists. You can get it with typeof(a).name.wrapper.
That line can also take types without parameters, but in those cases, typeof(a) === typeof(a).name.wrapper
1 Like