Join Slack
Now I am struggling using my kotlin/js code from JS… do I have to declare the functions in a special...
# javascript
b
bjonnh
12/17/2019, 1:49 AM
Now I am struggling using my kotlin/js code from JS… do I have to declare the functions in a special way so they get recognized?
a
ankushg
12/17/2019, 1:51 AM
You might need to use
@JsName
to make sure the functions don't get mangled. If you're using Dead Code Elimination, you also might have to add them as explicitly kept.
b
bjonnh
12/17/2019, 1:52 AM
I'm using the default JsBrowserWebpack
bjonnh
12/17/2019, 1:52 AM
not sure if it does DCE
bjonnh
12/17/2019, 1:57 AM
I'm doing import * as labcontrol from '@/labcontrol.js'
bjonnh
12/17/2019, 1:57 AM
but then I am expecting to be able to call the function myws from it
bjonnh
12/17/2019, 2:02 AM
The fun main() runs though
2
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by