-
-
Notifications
You must be signed in to change notification settings - Fork 412
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
Error with types in Typescript file using the ES6 module format. #630
Comments
Possible duplicate of #423 since there is currently no officical TypeScript support. Also DefinitelyTyped/DefinitelyTyped#52163 in case you are using that package. |
@b4git, did you arrive at a solution for this? |
For reference, this should work or alternative also make sure to install |
Thanks @CanRau. I believe I ended up getting this to work: Import DatabaseConstructor, { Database } from “better-sqlite3”
let db: Database
db = new DatabaseConstructor(“:memory:”) I do not remember particulars so…. |
Aah yea nice 👌 only thing if I recall correctly that's needing some tsconfig to support default imports which are kinda non-standard in TS if I'm not mistaken. |
Code (Link to Playground):
Error:
The text was updated successfully, but these errors were encountered: