Is there an equivalent of `@JvmSynthetic` for `kot...
# javascript
a
Is there an equivalent of
@JvmSynthetic
for
kotlin/js
? Something like
@JsSynthetic
? Reasons are almost similar to
@JvmSynthetic
for
kotlin/jvm
, don't need it to be callable form
typescript/javascript
b
Isn't that the default behaviour for ir anyways?
a
I need to apply to a method in a class I have already marked as
@JsExport
. I need all other methods to be callable from js except one in this case
b
Make them internal and that should be enough to hide them from js
g
I used the internal for a similar case, but it also means you can't do multi-modules without thinking about those methods. I think about 2 other ways : extension function so it's out of the class and is still public for the other modules, or write a wrapper annotated with @JsExport without this method (more boilerplate).
a
as @Grégory Lureau said. Making them internal means you can't do multimodule, but with @JvmSynthentic you can do multimodule
b
Feel free to vote for https://youtrack.jetbrains.com/issue/KT-43314 and share more about your case
Now (at least for master/1.6.20) you can try extract this part to non exported parent class or interface
a
thanks @bashor
I left a comment there
👍 2