Kotlin / kotlinx-datetime

KotlinX multiplatform date/time library
Apache License 2.0
2.42k stars 102 forks source link

Annotate Instant with @JsExport #419

Open lamba92 opened 3 months ago

lamba92 commented 3 months ago

Class Instant has been annotated with @JsExport to allow usage of it from JS code. Due to KT-62385 @JsExport doesn't play well with the WasmTarget, a workaround has been added as well.

lppedd commented 3 months ago

This will affect everyone using datetime, even the ones not using Instant.
Plus, it will possibly output an unwanted and unexpected TypeScript declaration.

This is what you need: https://youtrack.jetbrains.com/issue/KT-64813