https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
c

Chintan Soni

07/15/2020, 4:16 AM
Hey everyone, Is there any way I can generate TS (TypeScript) files for Kotlin/JS instead of plain old Javascript? Or any options that I can generate both of them? Right now, I am having this in build.gradle.kts:
Copy code
js(IR) {
        moduleName = "JsDomain"
        nodejs {
            testTask {
                useMocha {
                    timeout = "10000"
                }
            }
        }
        browser {
            testTask {
                useMocha {
                    timeout = "10000"
                }
            }
        }
    }
g

gildor

07/15/2020, 4:34 AM
Do you want to compile Kotlin to TypeScript?
a

audax

07/15/2020, 5:38 AM
You can do this with Kotlin 1.4 and a few hacks: https://github.com/audax/kotlin-vue-typescript-example
You are not creating TS files, but instead JS files with type headers for TS
👍 1
3 Views