I am coming back to Kotlin-MPP after a few years. I've got a Java backend and a TypeScript/React frontend. I want to share some code between the applications (mostly validation-logic). Exporting typescript definitions is still experimental and quirky, but I don't need that. My plan is to build the shared module, use it directly in the backend and export the interfaces via OpenAPI. So in my frontend code I use the interfaces created by the OpenAPI-stuff und then I pass the objects to the kotlin shared module, where some glue code converts the TypeScript objects to Kotlin objects, runs the validation logic and returns the results in native JS types.
Only problem with that: Apparently I can only export a JS library if I use "@JsExport", otherwise the module is just empty. "@JsExport" is still experimental, so I don't want to use it in a production environment.
Is there a solution for my problem or at least a timeline for the status of "@JsExport"?