-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
How to use it properly? #25
Comments
I have done the following to have the types available when using knex, based on this Stackoverflow answer: https://stackoverflow.com/questions/67034024/knex-js-table-infered-typescript-types
import * as db from './generated/db';
declare module 'knex/types/tables' {
interface Tables extends TablesType {
}
}
type TablesType = {
[table in keyof db.Tables]: db.Tables[table];
} |
Hey! Thank you for answering @snipd-mikel ! Just with that all the autocompletions should be working? How would you generate those types automatically? |
Hi @vencho-mdp. After using that fix, the typings for simple select, insert and update statements work fine. |
Hi! In the readme is shown clearly how this library can generate types, but how do we use them to incorporate them into our app?
The text was updated successfully, but these errors were encountered: