Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotate Instant with @JsExport #419

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

lamba92
Copy link

@lamba92 lamba92 commented Aug 2, 2024

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.

The function Instant.toEpochMillisecondsDouble() has been added to allow usage from JS code.
Add annotation targets and retention policies to SafeJsExport for both JS and WASM targets. This ensures consistent annotation behavior across different platforms.
@lppedd
Copy link

lppedd commented Aug 2, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants