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.
plugins {
id("net.akehurst.kotlin.kt2ts") version "1.2.0"
}
// configure the kt2ts plugin
kt2ts {
classPatterns.set(listOf(
"com.example.my.module.common.*"
))
}
doc TODO