Hi, I am adding @JsExport annotation to export my data class to TypeScript with help of generateTypeScriptDefinitions().
It is adding data class along with canonical name of them in .d.ts. Is there any way to avoid full canonical name and have just the class name in .d.ts file ?
a
Artem Kobzar
08/21/2023, 8:32 AM
We remove namespaces only with ES-modules. You could try it with
useEsModules
in your
build.gradle.kts
a
ankur2037
08/21/2023, 9:08 AM
would that work for kotlin version 1.8.20 ?
a
Artem Kobzar
08/21/2023, 9:09 AM
I believe that it should work but with a few bugs. So, better if you will try it with 1.9.0.
a
ankur2037
08/21/2023, 9:38 AM
Yeah, seems like there is some issue with classes have both serialisation and JsExport annotation in 1.8.20.
Its working fine with 1.9.0. Thanks for help 🙂