Hello everyone, as a newcomer to Kotlin/JS, I'm th...
# javascript
u
Hello everyone, as a newcomer to Kotlin/JS, I'm thrilled to have the opportunity to exchange ideas with all of you. I have a question at the moment and would appreciate your help. Thank you! In a similar scenario, both DSLCommonLibrary and TemplateDemo are Kotlin/JS projects, and TemplateDemo depends on DSLCommonLibrary. In DSLCommonLibrary, there's a class named JSApplication. However, in TemplateDemo, I'm unable to correctly obtain the type of this JSApplication, and I'm unable to perform type-related operations like typeOf or casting (as).
🧵 1
a
Pretty sure you have to call
require("the-module")
u
how do it,in kotlin
a
When you say "I'm unable" it means that you've gotten an compiler error?
You also can try to make smth like this:
Copy code
external val jsApplication: JSApplication

fun main() = console.log("Version is: ${jsApplication.version}")
1