Hello! I’m looking at the <docs for “using js code...
# javascript
a
Hello! I’m looking at the docs for “using js code from kotlin” and was wondering if there was ways to forgo the manual declaration of external dependencies (npm packages) and instead generate these from typescript definitions?
e
A fully automated way isn't available unfortunately. You can try with Dukat (although it might break with new TS versions), or Karakum (which is difficult to set up in most cases). I landed on a mix of Karakum + manual adjustments. The first generation will be costly in terms of spent time tho.
same 1
Also remember that most of the times you don't need a full copy of the externals, but just selected APIs. I'd start with what you really need first.
r
Also Claude is pretty good at producing these. May need a little tweaking, but a good way to automate 90%
🔝 1
e
The problem is always splitting the output up into multiple files. But might be that it's me, I don't like having a gigantic single file for all externals.
a
Awesome, thanks all! really nice to hear. I’ll likely just take the route of only defining partial/needed external functionality.