Hey guys, is there a way to force kotlin to provid...
# javascript
r
Hey guys, is there a way to force kotlin to provide an array instead of an arraylist for the js implementation? For JVM I would like to use the ArrayList. Is there some kind of annotation or something?
g
Do you need this for interop with JS?
r
Yes, I want to have a clean interface
I'm also looking for a way to convert a Map to a plain object
g
But there are no interfaces in JS, so maybe you can just write interop layer for this Kotlin interface
r
I have written a .d.ts file (some kind of type definition), I just want to avoid to expose the "jvm classes"
g
This is not JVM class, this is class that provide some kotlin specific features
Actually I see your use case, maybe someone has better solution
or maybe make sense to create an issue
r
yeah I know, but it looks like that on the first view
g
For now I think the only way is add some interop layer and expose only it in d.ts file
r
the source code where I get this issue is not yet published, just the library itself. It become strange when you use it from javascript or typescript
g
yes, I agree with you, some way to expose JS type would be helpful in such interop case
r
the interop layer is really an option, but not very easy to achive since it would need to shadow the full api