How can I tell if a type parameter is a generic or...
# ksp
j
How can I tell if a type parameter is a generic or concrete type?
Array<String>
vs
Array<T>
?
j
in your case it is not type parameter but rather type argument.
j
Right - sorry
I see now I’m looking at the wrong api
but it doesn’t seem like KSTypeArgument has that info either
If it is a type argument, the declaration will be a type parameter, is it is a concrete type, it will be a class declaration
j
with
KSTypeArgument
you can get the type by resolving, and get the declaration of that type. note that
KSTypeParameter
is a subtype of
KSDeclaration
j
Excellent thank you!