icomad
icomad
Explore posts from servers
DTDrizzle Team
Created by icomad on 9/9/2024 in #help
Correct typings for factory table
For anyone incurring in the same error, the solution was quite easy, you have to explicitly type the return value of the factory function like this:
export const createTableFactory = <...>(...): PgTableWithColumns<{
name: TTableName;
schema: string | undefined;
columns: BuildColumns<TTableName, TColumnsMap, "pg">;
dialect: "pg";
}> => { ... }
export const createTableFactory = <...>(...): PgTableWithColumns<{
name: TTableName;
schema: string | undefined;
columns: BuildColumns<TTableName, TColumnsMap, "pg">;
dialect: "pg";
}> => { ... }
2 replies
DTDrizzle Team
Created by icomad on 6/7/2024 in #help
Table factory typescript problem
Yeah, at the end I came up with something exactly like your implementation, it will do for now, thank you!
3 replies