-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript Definition File? #182
Comments
No Typescript Definition File yet I am afraid. |
hmm, I guess I have one somewhere. |
Hey @dryganets, quite a few months ago you mentioned about a type definition file for this, but is not available (or I can't find it) Is it going to be produced? |
By the way, it would be great to get the type definition file. I have created a couple of other projects and I've started to read your tests ( |
@rodrigoelp PR for TypeScript would be welcome. I don't know where to start either but hope you can figure it out. |
Hi @andpor, I've started to look into it and have created the basic shape of the The plugin as such as: Then the database as such should be: All these definitions have a callback and promise flavour. Am I missing something else? |
these are the functions of the database - you need an instance [false,"SQLitePlugin","transaction",false,true,true], These are database factory methods: Depending on the interface choice these work in a callback or promise fashion. DEBUG and enablePromise are utility functions that related to the module rather than the db itsef. |
Guys it looks like @matrosov-nikita contributed a nice set of typings for DefinitelyTyped in storesafe/cordova-sqlite-storage#657 and I am thinking to integrate into the cordova-sqlite-storage plugin project that this project was based on. It may be ideal to share the typings between the different sqlite plugin versions as much as possible. If you would like to see something different from the typings proposed in storesafe/cordova-sqlite-storage#657 I would appreciate a PR for discussion on https://github.com/litehelpers/Cordova-sqlite-storage. |
This might be not ideal but should unblock you. |
Ok, I've created a pull request with the signatures to match the I will gladly receive comments from any of you about this as part of the review process. The pull request is: #221 |
@dryganets just noticed you had created an earlier pull request with your own definitions. I guess @andpor will be happy to pick one of the two and discard the other one. |
@types/react-native-sqlite-storage now exists, so I think this can be closed @andpor |
yep @jonmountjoy, I ended up making the PR to the DT, it was faster to merge. |
Hi, sorry to bother you, and I know this isn't an "issue" as such. But is there a Typescript Definition file I can download somewhere for this package?
I am trying to write my own as I go and just add whatever functions and return types I need as I find them, but I've not got much experience in writing d.ts files so if someone already has one I would really appreciate a copy.
Perhaps one could be added into the repo?
Thanks :)
The text was updated successfully, but these errors were encountered: