Did I declared the module wrong?
# javascript
a
Did I declared the module wrong?
Ok, moving them to a separate file solves the issue blob thinking upside down is it necessary? I guess for
fun require(module)
it is not required, but somehow functions annotated with
@JsModule
seems to have this requirement 🤔
t
You need
@file:JsModule
on file
👀 1
a
Any reason that's mandatory or something?
t
Copy code
@JsModule("os")
exterrnal fun arch()

arch() // JS - os()

-------------------------------
@file:JsModule("os")

exterrnal fun arch()

arch() // JS - os.arch()
a
I asked for the reason not example lol
I already found that myself
Ok, moving them to a separate file solves the issue blob thinking upside down is it necessary?
t
a
Oh 👀
Nice, thanks for the help 🙂👍
🚀 1
t
You can vote here for restriction removing