zakodium / adonis-mongodb

MongoDB provider for AdonisJS 5
https://zakodium.github.io/adonis-mongodb/
Other
64 stars 12 forks source link

Query types question #126

Open maasencioh opened 2 years ago

maasencioh commented 2 years ago

After latest update I have new error type on the queries. What should be the new way for adding the types for a query object? I'm doing this

type NotReadOnly<T> = {
  -readonly [P in keyof T]: T[P];
};
let query: Filter<NotReadOnly<ModelAttributes<Sample>>> = {};

But I get errors on types like $regex, $or, and basically all other operators

maasencioh commented 2 years ago

@targos @stropitek ?

stropitek commented 2 years ago

Please provide more information about your problem