Skip to content

Commit caf7b92

Browse files
committed
Add generateDts option
1 parent efb98dd commit caf7b92

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/src/main/kotlin/com/tschuchort/compiletesting/KotlinJsCompilation.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ class KotlinJsCompilation : AbstractKotlinCompilation<K2JSCompilerArguments>() {
4545
HostEnvironment.kotlinStdLibJsJar
4646
}
4747

48+
/**
49+
* Generate TypeScript declarations .d.ts file alongside JS file. Available in IR backend only
50+
*/
51+
var generateDts: Boolean = false
52+
4853
// *.class files, Jars and resources (non-temporary) that are created by the
4954
// compilation will land here
5055
val outputDir get() = workingDir.resolve("output")
@@ -86,6 +91,7 @@ class KotlinJsCompilation : AbstractKotlinCompilation<K2JSCompilerArguments>() {
8691
args.irDcePrintReachabilityInfo = irDcePrintReachabilityInfo
8792
args.irOnly = irOnly
8893
args.irModuleName = irModuleName
94+
args.generateDts = generateDts
8995
}
9096

9197
/** Runs the compilation task */

0 commit comments

Comments
 (0)