toTypeName

fun KmType.toTypeName(): TypeName

Converts a Kotlin metadata type to a KotlinPoet TypeName.

As with the KSP processor, the type aliases are expanded and the function types are FunctionN types. The type parameters are named T<id>.