Open agladysh opened 12 months ago
Thank you! I agree that this would be really nice to have a Typescript interface available. I don't have a lot of experience with TS, so I would need to consider how this might affect the overall structure of the project, perhaps we would need a new rbql-ts
folder with typescript code? Also, this would need some docs and at least a minimal set of unit tests probably, so this could end up being a big undertaking. If you have time and willingness to do this I would really appreciate your help!
@mechatroner I believe no separate implementation would be needed, just the type declarations file, similar to one I provided above. See https://github.com/DefinitelyTyped/DefinitelyTyped for the process with all bells and whistles.
That is, I'm already using the rbql-js as an npm module from my TypeScript code. The proper declarations file would make it much more convenient.
It would be nice to have a type declaration for TypeScript.
Here is a very rough draft I quickly authored with the help of the Claude 2 AI. It is most certainly subtly wrong — I forgot to drop the AI temperature 🤦 . Still, I used it to write actual code today, so it works at least for my very limited use case.
Sorry for not sending a PR, but it is way too raw for my taste. If you're interested, I can improve it and submit sometime in the future.