how to get generic table type
I tried to use AnyPgTable type to make dynamic function
but i need to have id type
all tables have serial id column
but i need to have id type
all tables have serial id column
typescript: Property 'id' does not exist on type 'AnyPgTable'. [2339] async findById(id: number, table: AnyPgTable) {
const res = await this.db.select().from(table).where(eq(table.id, id));
return res.at(0);
} id: serial('id').primaryKey(),