Files
kotlin-fork/js/js.translator/testData/_commonFiles/testUtils.kt
T
2023-08-08 18:10:19 +02:00

8 lines
314 B
Kotlin
Vendored

package testUtils
@JsName("eval")
private external fun evalToBoolean(code: String): Boolean
fun isLegacyBackend(): Boolean =
// Using eval to prevent DCE from thinking that following code depends on Kotlin module.
evalToBoolean("(typeof Kotlin != \"undefined\" && typeof Kotlin.kotlin != \"undefined\")")