You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The type definitions, overloads, and inferences necessary to make leftJoin work are quite complicated, and manually specifying a type as in .leftJoin<Table2_Type> may confuse it. However, if you augment the Table interface and let TypeScript + Knex infer the appropriate generic types itself, it ought to work. (At least, it does for my project.)
Yes, I do augment the table interface with all new tables.
Just note my original query is quite a lengthy one with multiple joins, for a few joins type is inferred correctly but after some more joins it just doesn't infer it anymore.
Environment
Knex version: 2.0.0
Postgres+ 12.11:
OS: Windows
Questions about how to use knex
I am trying to use Knex and inspect the types of the result so for instance
The entries type is correct for each column selected.
But once I try to make a join like this
All types are marked as never, am I missing something ?
The text was updated successfully, but these errors were encountered: