Public interface to get all type parameters?

I might misunderstand the question, but would something like

julia> struct S{T1, T2} end

julia> get_parameters(::S{T1, T2}) where {T1, T2} = (T1, T2)
get_parameters (generic function with 1 method)

julia> s = S{Float32, UInt64}()
S{Float32, UInt64}()

julia> get_parameters(s)
(Float32, UInt64)

not work? (By the way, my suggestion here is very similar to a post of @sylvaticus in the first topic thread you linked.)