typeOf

fun <T> typeOf(value: T): KType(source)

Obtains a Kotlin KType instance for a Java value.

This method is a workaround required for now. In the future, when we move to stabilize the Java KtMongo driver, this will not be necessary anymore.