Typescript definition file generator for kotlin (js) classes
Kotlin is great. However, if you want to integrate it into an angular application (or other typescript) we need to generate the typescript declaration file and package.json. Neither of these is currently created by the kotlin JS compiler.
This plugin is intended for use in a kotlin multiplatform development. It uses JVM reflection over the kotlin-JVM module to generate the .d.ts file that is intended for use with the kotlin-js module.
The plugin addresses use cases such as:
- generating .d.ts file for your own kotlin module
- generating .d.ts file for a third-party module
- building an angular application and integrating kotlin generated modules.
Minimal documentation is below, for full documentation please register here [https://info.itemis.com/en/kotlin-typescript-integration/]. The company that has kindly sponsored the development of this plugin would like your email address.
A blog post that discusses the issues this plugin tries to solve can be found here [https://medium.com/@dr.david.h.akehurst/building-applications-with-kotlin-and-typescript-8a165e76252c].
plugins {
id("net.akehurst.kotlin.kt2ts") version("$version")
}
// configure the kt2ts plugin
kt2ts {
classPatterns.set(listOf(
"com.example.my.module.common.*"
))
}