Given a KSFunctionDeclaration and a KType for a fu...
# ksp
m
Given a KSFunctionDeclaration and a KType for a function, e.g.
(String) -> Unit
, is there an easy way to check if the KSFunctionDeclaration matches that signature?
j
unfortunately no, but you should be able to write a utility function that convert to signature. the
toString
function in
KSType
is from compiler and is quite ready to use. Be cautious when any types involves types from Java though, the
toString
result for Java types can be a little bit tricky due to the nullability difference between kotlin and Java.