Kotlin / dukat

Converter of <any kind of declarations> to Kotlin external declarations
558 stars 42 forks source link

[Question][Discussion] Practical cases of when should generate bindings #285

Open sigmasoldi3r opened 4 years ago

sigmasoldi3r commented 4 years ago

First of all thanks for all the effort to maintain this tool!

I'm trying to generate bindings for a project called Discord.js from their own typings. But I'm unable to fix the errors of the generated Kotlin code (I've been about 1 hour). I suppose that this comes from the fact that Typescript, although it has static types, comes from a very dynamic language (Javascript). I suppose that the dynamic nature of JS and the static nature of Kotlin clashes in some cases.

How can I have and idea of when to generate and when not? Maybe when the project is made in pure Typescript? The discord.js project is written in Javascript and bindings are later generated for Typescript. That might be the source of the problems? Thoughts?

sigmasoldi3r commented 4 years ago

Also note that I can create a repo or even zip the results for further discussion, maybe it's not the project itself, is that I am forgetting something (Like passing additional config maybe?)

Also excuse my ignorance! Sorry if this discussion seems very dumb, it's the first time I try to use dukat.

sigmasoldi3r commented 4 years ago

Examples of what I mean, aside from missing types from NodeJS (That maybe should be generated apart?):

And maybe there are others, but I cannot see them. If all those are planned and just are WIP tasks, let me know! And, in the other hand, if those edge cases are not covered by dukat I should not try to generate bindings.