Nico
07/18/2020, 10:55 AM@JsExport
is actually quite restrictive. I am wondering whether there are any plans to relax this in the future? I am mostly thinking supporting enums and properties without fields. At the moment I cannot export a class annotated with @Serializable
. The specific use case is sharing a data class between my TS and Kotlin/jvm codebases
Otherwise amazing work with 1.4, it's amazing to have TS definitions for kotlin codejanvladimirmostert
07/18/2020, 11:01 AMNico
07/18/2020, 11:11 AMNico
07/18/2020, 11:12 AM@Serializable
is not very niche eitherjanvladimirmostert
07/18/2020, 11:17 AMNico
07/18/2020, 11:18 AMjanvladimirmostert
07/18/2020, 11:19 AMconsole.log(JSON.stringify(json("email" to state.email)))
on the JVM side it's easy, just use Jackson or Gsonjanvladimirmostert
07/18/2020, 11:20 AMNico
07/18/2020, 11:21 AMNico
07/18/2020, 11:21 AMjanvladimirmostert
07/18/2020, 11:22 AMexpect fun RegisterState.toJson(): String
expect fun RegisterState.fromJson(value: String)
janvladimirmostert
07/18/2020, 11:22 AMNico
07/18/2020, 11:24 AMNico
07/18/2020, 11:24 AMjanvladimirmostert
07/18/2020, 11:26 AMNico
07/18/2020, 11:27 AMturansky
07/18/2020, 11:30 AMturansky
07/18/2020, 11:32 AMjanvladimirmostert
07/18/2020, 12:14 PMturansky
07/18/2020, 12:40 PMdazza5000
09/03/2020, 4:37 AM