smaccounS
Convex Community12mo ago
6 replies
smaccoun

Types for resuing filters

Anyone know how to type a filter we may want to reuse?

Goal:

const someReusedFilter = (q: QueryInitializer<>) => q.filter(q.eq("someField", true))

I can see that e.g. a query is a QueryInitializer or OrderedQuery but can't quite figure out how to type the parameters etc
Was this page helpful?