Bernhard
07/27/2024, 10:38 AM@OptIn(ExperimentalContracts::class)
fun isJsObject2(x: Any?): Boolean {
contract {
returns(true) implies (x is Record<String, Any?>)
}
return jsTypeOf(x) == "object" && x !is Array<*> && x != null
}
but it's having trouble with erased types from external interfacesturansky
07/27/2024, 11:07 AMBernhard
07/27/2024, 11:09 AM