I’m having trouble with translating this instantiation of a class to kotlinjs
var ui = new firbeaseui.auth.AuthUI(firebaseI.auth());
.
Doing the naive thing in kotlin does not result in a “new” call in the generated code e.g.
val ui = firebaseui.auth.AuthUI(firebase.auth())
does not work.
rightnow I am doing the following, which works but is a bit ugly
Copy code
external val uiHack: AuthUI
val firebaseHack = firebase // firebase is imported as `@JsModule("firebase") external val firebase: Firebase`
val firbeaseUIHACK = firebaseui // same as above
js("var uiHack = new firbeaseUIHACK.auth.AuthUI(firebaseHack.auth());")
val ui = uiHack