<@U7V1LUY64> ```val myDynamicConstructor = ... // ...
# javascript
t
@Jorrit
Copy code
val myDynamicConstructor = ... // for class T
val myClass = myDynamicConstructor.unsafeCast<JsClass<T>>()
val t: T = myClass.newInstance()
j
My JsClass doesn't seem to have newInstance. Googling it leads me to https://discuss.kotlinlang.org/t/creating-new-object-using-jsclass/2092 , which is pretty much exactly what I have been doing. But not stdlib way?
t
My JsClass doesn't seem to have newInstance
A.newInstance()
translated to
new A()
j
That part I understand, I just don't seem to have the declaration...