how to type dynamic where condition

i'd like to do something like

async function selectEventByCondition(condition) {
    return db.query.events.findFirst({
        where: condition,
        with: {
            exceptions: true,
        },
    })
}


however the condition is any type in this case. does drizzle provide a type i can use? prisma has generated types that can be used in similar situations
Was this page helpful?