Skip to content

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

@benallfree

Description

@benallfree

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?

Activity

theogravity

theogravity commented on Nov 1, 2023

@theogravity
Collaborator

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

theogravity

theogravity commented on Nov 1, 2023

@theogravity
Collaborator

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

theogravity

theogravity commented on Nov 1, 2023

@theogravity
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

theogravity commented on Nov 1, 2023

@theogravity
Collaborator

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

benallfree commented on Nov 2, 2023

@benallfree
Author
theogravity

theogravity commented on Nov 2, 2023

@theogravity
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

benallfree commented on Nov 2, 2023

@benallfree
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

theogravity commented on Nov 2, 2023

@theogravity
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @theogravity@benallfree

      Issue actions

        Why are sqlite3 typings included here when sqlite3 has its own typings? · Issue #175 · kriasoft/node-sqlite