Skip to content
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

Why are sqlite3 typings included here when sqlite3 has its own typings? #175

Closed
benallfree opened this issue Nov 1, 2023 · 9 comments · May be fixed by #177
Closed

Why are sqlite3 typings included here when sqlite3 has its own typings? #175

benallfree opened this issue Nov 1, 2023 · 9 comments · May be fixed by #177

Comments

@benallfree
Copy link

I'm hitting a situation where TS is finding the sqlite3 typings in this package instead of using the sqlite3 typings included in its own package. Is it still necessary to vendor the sqlite3 typings here?

@theogravity
Copy link
Collaborator

I'm not sure. I'll have to look into it. I did it for reasons that I no longer remember.

@benallfree
Copy link
Author

@theogravity
Copy link
Collaborator

Must be new since my defs came from the @types repo according to the comments in the typed file

@theogravity
Copy link
Collaborator

It looks like I do this so I can use the types in my own code. I'll need to investigate how safe it is to remove, as I'd be importing sqlite3 as a dev dep here

@theogravity
Copy link
Collaborator

theogravity commented Nov 1, 2023

Ok, so the reason why it's like that is because I don't want sqlite3 to be a direct dependency of the project, but I still need the types for my own code. I did try to remove the dev dep and tried using a direct sqlite3 reference, but I couldn't get the project to compile properly.

As a compromise, I've copied the types from the sqlite3 project itself. If you have alternative solutions, please open a PR.

@benallfree
Copy link
Author

benallfree commented Nov 2, 2023

@theogravity
Copy link
Collaborator

That would require the end-user to install it, and again, I don't want it to be a requirement on any side.

@benallfree
Copy link
Author

I'm sorry, I understand the issue now. You want to keep this with zero dependencies.

but I couldn't get the project to compile properly

Can you say more? Would you like me to take a look?

@theogravity
Copy link
Collaborator

I tried removing the vendor file completely and only use the dev dep / typescript reference but had issues with typescript trying to compile.

Feel free to experiment to see if you can get it to build and retain type info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants