Detecting `Tuple{Type{some type}}`

You can do

julia> Tuple{Type{Complex}} <: Tuple{Type{T}} where {T}
true

# as @torrance says, the T is not needed above:
julia> Tuple{Type{Complex}} <: Tuple{Type}
true

julia> Tuple{Type{Float64}} <: Tuple{Type{<:Number}}
true

etc.

The latter will work for subtypes of Number, while the former takes all sorts of types.

1 Like