Is there a ``mytypeof((Vector, Int))`` returning ``Tuple{Type{Vector}, Type{Int}}``?

I just was surprised that some code was not optimized accordingly and I realized it is because I used something like typeof((Vector, Int, 1)) which unfortunately forgets the type information and returns Tuple{UnionAll, DataType, Int}.

Is there a function which preserves all the type info and returns Tuple{Type{Vector}, Type{Int}, Int} instead?

I don’t know of one, but you could define

typ(a::Union{DataType, UnionAll}) = Type{a}
typ(a) = typeof(a)

julia> typ.((Vector, Int, 1))
(Type{Array{T,1} where T}, Type{Int64}, Int64)

If you specifically want the types in a Tuple you could do
Tuple{typ.((Vector, Int, 1))...}

thanks a lot!