For example:
get_type_parameters(Matrix) == (TypeVar(:T), 2) # This equality technically doesn't hold because `TypeVar(:T) ≠ TypeVar(:T)`
get_type_parameters(Matrix, 1) == TypeVar(:T) # This equality technically doesn't hold because `TypeVar(:T) ≠ TypeVar(:T)`
get_type_parameters(Matrix, 1, nothing) == nothing # Set a default value to use if unspecified
This would act as a public API for the private functionality TypeParameters.parameters, and serves as an unchecked version of type_parameters.