[Wasm] Rename JsHandle to JsReference

Decision to do this was made at Kotlin/Wasm interop design meeting
This commit is contained in:
Svyatoslav Kuzmich
2023-04-19 15:38:47 +02:00
committed by teamcity
parent 7ba8f7cce2
commit 933f47aaf9
8 changed files with 29 additions and 29 deletions
@@ -44,7 +44,7 @@ fun testExterRef() {
}
class DataRefImpl
typealias DataRef = JsHandle<DataRefImpl>
typealias DataRef = JsReference<DataRefImpl>
fun notNullDataRef(x: DataRef): DataRef = js("x")
@@ -55,7 +55,7 @@ fun nullDataRef(x: DataRef): DataRef? = js("x")
fun null2DataRef(x: DataRef): DataRef? = js("null")
fun testDataRef() {
val dataRef = DataRefImpl().toJsHandle()
val dataRef = DataRefImpl().toJsReference()
check(notNullDataRef(dataRef) == dataRef)
checkNPE { notNull2DataRef(dataRef) }
check (nullDataRef(dataRef) == dataRef)