[Wasm] Migrate usages of @JsFun to js("code")
This commit is contained in:
committed by
Space Team
parent
7a04999e4a
commit
7175b9f31c
@@ -3,11 +3,11 @@ package test.js
|
||||
import kotlin.js.*
|
||||
import kotlin.test.*
|
||||
|
||||
@JsFun("async () => 'foo'")
|
||||
internal external fun jsAsyncFoo(): Promise<Dynamic?>
|
||||
internal fun jsAsyncFoo(): Promise<Dynamic?> =
|
||||
js("(async () => 'foo')()")
|
||||
|
||||
@JsFun("() => 'foo'")
|
||||
internal external fun jsFoo(): Dynamic
|
||||
internal fun jsFoo(): Dynamic =
|
||||
js("'foo'")
|
||||
|
||||
var state: Dynamic? = null
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ package test.wasm.unsafe
|
||||
import kotlin.wasm.unsafe.*
|
||||
import kotlin.test.*
|
||||
|
||||
@JsFun("(a, b) => a + b")
|
||||
private external fun jsConcatStrings(a: String, b: String): String
|
||||
private fun jsConcatStrings(a: String, b: String): String =
|
||||
js("a + b")
|
||||
|
||||
@OptIn(UnsafeWasmMemoryApi::class)
|
||||
class MemoryAllocationTest {
|
||||
|
||||
Reference in New Issue
Block a user