Hey Is there a way to represent `representsTypeOf...
# getting-started
i
Hey Is there a way to represent
representsTypeOf
method in the interface? (Interface serves as the module API, and provides definition for this method implemented by the
FooImpl
class)
e
text instead of screenshots would be appreciated
👍 1
Copy code
interface Foo {
    fun representsTypeOf(kType: KType): Boolean
}

class FooImpl {
    override fun representsTypeOf(kType: KType): Boolean = TODO()
}

inline fun <reified T> Foo.representsTypeOf(): Boolean = representsTypeOf(typeOf<T>())
i
Works like a charm. thx @ephemient