I have ReactNative project and I'm trying to call simple JS function from Kotlin (calling Kotlin from JS works fine). My project directory looks like this:

"shared" module is compiled as commonjs module.
In Main.kt I have (shortened):
external fun myFun()
In App.js I have (shortened):
import * as shared from './shared/build/classes/kotlin/main/shared.js'
export function myFun(){
console.log("Hello")
}
So I'm trying to call myFun() from Kotlin to get console log in JS. But I get exception:
myFun is not defined
I was looking to this docs:
https://kotlinlang.org/docs/reference/js-interop.html
https://kotlinlang.org/docs/reference/js-modules.html#applying-jsmodule-to-packages
But I not sure how to use those annotations (if they are needed?).
Thanks for help.