Join Slack
Powered by
Doesn't this work? ``` external fun <T> imp...
# javascript
f
Filipp Riabchun
02/22/2018, 10:23 PM
Doesn't this work?
Copy code
external fun <T> import(moduleName: String): Promise<T>
t
Tristan Caron
02/23/2018, 7:06 AM
It works if I use others files than kotlin
f
Filipp Riabchun
02/23/2018, 11:26 AM
Separate Kotlin modules (not packages) should compile to separate CommonJS modules
t
Tristan Caron
02/23/2018, 2:35 PM
But you loose the typing, unless you also do a definition file
f
Filipp Riabchun
02/23/2018, 2:42 PM
Yes, looks like you need a separate module with API definition for each lazy-loaded module in that case
Open in Slack
Previous
Next