[Wasm] Support Number type for external functions

This commit is contained in:
Igor Yakovlev
2022-12-27 16:22:57 +01:00
committed by teamcity
parent 4dedd47172
commit 1b2b7ce34c
5 changed files with 74 additions and 0 deletions
@@ -261,6 +261,9 @@ private val jsEmptyString by lazy(::getJsEmptyString)
private val jsTrue by lazy(::getJsTrue)
private val jsFalse by lazy(::getJsFalse)
internal fun numberToDoubleAdapter(x: Number): Double =
x.toDouble()
internal fun kotlinToJsAnyAdapter(x: Any?): ExternalInterfaceType? =
if (x == null) null else anyToExternRef(x)