whoami
whoami2y ago

convex helpers need to be updated with convex 0.16

Property 'filter' in type 'WrapQuery<T>' is not assignable to the same property in base type 'Query<T>'.
Type '(predicate: (q: FilterBuilder<T>) => Expression<boolean>) => WrapQuery<T>' is not assignable to type '(predicate: (q: FilterBuilder<T>) => ExpressionOrValue<boolean>) => this'.
Type 'WrapQuery<T>' is not assignable to type 'this'.
'WrapQuery<T>' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'WrapQuery<T>'.
Property 'filter' in type 'WrapQuery<T>' is not assignable to the same property in base type 'Query<T>'.
Type '(predicate: (q: FilterBuilder<T>) => Expression<boolean>) => WrapQuery<T>' is not assignable to type '(predicate: (q: FilterBuilder<T>) => ExpressionOrValue<boolean>) => this'.
Type 'WrapQuery<T>' is not assignable to type 'this'.
'WrapQuery<T>' is assignable to the constraint of type 'this', but 'this' could be instantiated with a different subtype of constraint 'WrapQuery<T>'.
filter(
predicate: (q: FilterBuilder<T>) => Expression<boolean>,
): WrapQuery<T> {
return new WrapQuery(this.q.filter(predicate), this.p)
}
filter(
predicate: (q: FilterBuilder<T>) => Expression<boolean>,
): WrapQuery<T> {
return new WrapQuery(this.q.filter(predicate), this.p)
}
https://github.com/get-convex/convex-helpers/blob/4360d3e57a622e293407c9293a1fc745cc731dbe/convex/lib/rowLevelSecurity.ts
GitHub
convex-helpers/rowLevelSecurity.ts at 4360d3e57a622e293407c9293a1fc...
A collection of useful code to complement the official packages. - convex-helpers/rowLevelSecurity.ts at 4360d3e57a622e293407c9293a1fc745cc731dbe · get-convex/convex-helpers
1 Reply
lee
lee2y ago
Should be fixed ( https://github.com/get-convex/convex-helpers/pull/28 ). Let us know if you hit any more problems!
GitHub
upgrade convex to 0.16.0 by ldanilek · Pull Request #28 · get-conve...
fix small type errors in RLS caused by slightly changed types in convex 0.16.0. Otherwise I don't think any of the breaking changes affect convex-helpers

Did you find this page helpful?