I’m trying to build a JavaScript library (jscommon) with Kotlin. The resulting library has no documentation (such as JSDOC) which means the users of the library will get no information or auto-complete from their IDE, not even which type of arguments they should pass to the functions. This will make the library very difficult to use.
Is there a way to make the compiler generate such documentation?
Thanks, I found your article while looking for a solution but it doesn’t explain how you created the definitions file because the solution was too specific. Can you share more details? Did you use something like ts-generator?
I didn’t use anything special, just printed text to a text file. the .d.ts format is very simple.
The “very specific” part here, is that my script wouldn’t run on every arbitrary script, but focuses on the specific known project structure. You can see the code in the commits history.
I guess that a more generic solution may be found. It was too much time for the task I was working on, however.