Get the type parameters of a parametric type

Perhaps:

get_parameter_type(::MyStruct{T}) where T = T
4 Likes