Hello, was wondering if I could get some help on h...
# webassembly
s
Hello, was wondering if I could get some help on how to write a particular WASM+javascript interop binding
The Javascript looks like this (its from Google's Firebase lib)
I'm struggling on how to format that second parameter for the kotlin definition
Well that's strange, finally got it working, for those interested Binding looked like this:
Copy code
external object FirebaseAuth{
    fun updateProfile(user:User, profileUpdate:JsAny):Promise<JsAny?>
}
Actual call from Kotlin-side looked like this
Copy code
FirebaseAuth.updateProfile(user, getProfileUpdate(display = username))

...

fun getProfileUpdate(display:String = "", photoUrl:String = ""):JsAny = js("""
   ({
    displayName: display,
    photoURL: photoUrl
    })
""")
👍 3