[@types/better-sqlite3] Allow statement output to be generic (instead of as unknown) #69358
Unanswered
beenotung
asked this question in
Issues with a @types package
Replies: 3 comments
-
The generic type can be passed from the prepare method as well |
Beta Was this translation helpful? Give feedback.
0 replies
-
created pull request in #69359 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently we need to cast the result type, or to parse it with static-typed parser. I suggest we allow explictly stating the result type via generic type.
Ideally, the result type could be inferred from the sql string, which may be implemented in the future version.
Current version:
Suggested version:
Beta Was this translation helpful? Give feedback.
All reactions