Which typescript type should I use for select?

Hi, this question might be confusing. Let me explain the problem, I'm building a common function for drizzle().select() somethine like
const data = await selectQuery(ctx, tableName, {id:tableName.id, data:tableName.data}); // should return {id:number,data:string}

// select
export const selectQuery = async <T extends SQLiteTable<TableConfig>>(ctx: TRPContextUser, table: T, select: SelectedFields) => {
    return await drizzle(ctx.c.env.DB).select(select).from(table).all(); // returning {[x:string]:never}
};


you can see I'm getting {[x:string]:never} when I pass {id:number;data:string} on select param.
Was this page helpful?