Looks like @JsPlainObject interfaces with method d...
# javascript
b
Looks like @JsPlainObject interfaces with method definitions crash super hard without any good debug info:
Copy code
@JsPlainObject
external interface Test {
    fun test()
}
should I file a bug?
1
b
Yes, please do file a bug.
t
Valid declaration:
Copy code
@JsPlainObject
external interface Test {
    val test: () -> Unit
}
b
thank you
t
Goal of JSO - provide factory and copy functions
If you will use functions inside - it won't be possible:
Copy code
@JsPlainObject
external interface Test {
    fun test()
    fun test(s: String)
    fun test(s: String, n: Number)    
}

Test(
    test = ??? // which type
)
b
maybe still a good idea to error out with a better error, but I'm not familiar with the plugin code
t
good idea to error out with a better error
It's issue 🙂