Hey, I have a kotlin JS IR library which use <@UL1...
# javascript
h
Hey, I have a kotlin JS IR library which use @Big Chungus npm plugin to publish its npm module using JSExport. But unfortunately, we use a class containing a property
kotlinx.datetime.Instant
. How do you export
kotlinx.datetime.Instant
to create an Instant in typescript?
b
You can't (since you don't own that class in your lib). But you can export your helper fun that builds an instance 😉
Alternativelly (and I'm not sure if it should even work) you could try this
Copy code
@JsExport
typealias Instant = kotlinx.datetime.Instant
h
Thanks! I will try it