I've published all the externals I wrote for VS Co...
# javascript
e
I've published all the externals I wrote for VS Code (and other libraries) https://github.com/lppedd/kotlin-externals They're not pushed to Maven Central yet, as I want to first use them internally and see how they work.
🎉 4
t
0. Good work! 0.1. We need 1 mega-repository 🙂 Fast review results: 1. Vararg processing is invalid a.
...args: any[]
->
vararg args Any
(without
Array
) 2.
Array
->
ReadonlyArray
expected 3.
Union
can be/must be replaced with more elegant solution a. We have some drafts for wrappers 4.
@JsTrue
/`@JsFalse` problem partially solved in Seskar a. Check required if you have additional cases cc @Sergei Grishchenko
e
Thanks! Will fix them!
We need 1 mega-repository
I couldn't push them to kotlin-wrappers as they're not really auto-generated (as you can see from the readme), but hopefully at some point the generation process will be able to cover 99% of the cases without having to write a lot of additional code.
Btw, where did you find the
vararg
with Array?
The Union typealias is just to let me understand it's a union, so that when I go back to fix them, if ever Kotlin will support denotable unions, it will be easier
t
Union in TS != can't be strict in Kotlin
We have pills with Kotlin magic
👀 1
e
Solved the Array stuff. Now I need to wait for Seskar and then I can try to build a VS Code extensions with them
The most problematic part will be writing tests with Mocha. Usually Mocha test suites are top level in the file. However Kotlin doesn't have a top level concept for function calls.
t
Do you use Seskar in common code?
e
No everything is under
jsMain
Although if https://youtrack.jetbrains.com/issue/KT-56618 gets done, I'll move externals under
commonMain
t
JS externals in common main?
e
Ahh no sorry, that is for
@JsExport
, wrong issue
But anyway, the problem with Seskar is it's using the "old" way of attaching JS dependencies. If I recall correctly it was changed 1.3 or 1.4
JS externals in common main?
Now that I've read that issue again, it's exactly what is being proposed. At least for interfaces
t
Why do you need JS interfaces in common?
e
Better interop with JS consumers
🤪 1
It was easy after understanding the configuration order part https://github.com/lppedd/kotlin-externals/commit/f80f19b66027eeb0a003328267d047e90a194d43
Works fine now, thanks!