type config findMany or findFirst

Hi,
I've one question i don't find the way to type correctly findMany()

Like:
export async function findAll({
withRecipes = false,
config,
}: {
withRecipes: boolean;
config?: KnownKeysOnly<any, any>;
}) {
return db.query.users.findMany({
with: {
...(withRecipes && {
recipes: true,
}),
},
...config,
});
}

i would like to know how type config options i've found KnownKeysOnly but without success

thank's
Was this page helpful?