There's nothing like this in stdlib, but you can u...
# javascript
k
There's nothing like this in stdlib, but you can use JS interop:
Copy code
fun <T : Any> JsClass<T>.createInstance(): T {
    val cls = this
    return js("new cls()")
}
👍 1