does anybody know how to generate .d.ts typescript...
# announcements
p
does anybody know how to generate .d.ts typescript definitions from my jvm project data / value classes? I read about (https://kotlinlang.org/docs/js-to-kotlin-interop.html#jsexport-annotation) but don’t get it if it works from an jvm style kotlin project.
c
its a feature of the js backend. so if you could put your data classes into a common module, and create the typescript from those. your jvm project does not need to be multiplatform, it can just depend on the common module of the multiplatform build
p
so, in a common module, I would add an gradle task to produce .d.ts ?
c
you need a common module, and a js module that builds the common module as js. and there you produce the d.ts
i think its probably much easier to just create the typescript types from kotlin source with a small tool that does exactly that.