If you use lambdas, you need to return `Unit.INSTA...
# javascript
a
If you use lambdas, you need to return
Unit.INSTANCE
from Java side, whereas if you like to use SAM interface you cannot export it to js 😂. Any suggestion to make both part happy?
t
AFAIK Any interface exporting doesn’t in Kotlin
1.5.0
, isn’t it?
a
@turansky Oh yeah, the docs specify it can be exported. But to me it gives error as:
Ok, just found a ticket https://youtrack.jetbrains.com/issue/KT-45434 and it seems it applies to normal interfaces as well as functional ones 🤔
t
Interface export still isn’t supported
a
Wait it compiles in 1.4.30
👀
t
IR or legacy?
Wait it compiles in 1.4.30
Missed warning 🙂
a
In playground only legacy is available. Oh wait, legacy doesn't export to d.ts ri8 😮
Lemme try once in IR
@turansky It did exported successfully in 1.4.32
Ok, just found a ticket https://youtrack.jetbrains.com/issue/KT-45434 and it seems it applies to normal interfaces as well as functional ones 🤔
I should prolly wait until it fixes in 1.5.0
👍 1