adonis-mongodb icon indicating copy to clipboard operation
adonis-mongodb copied to clipboard

Query types question

Open maasencioh opened this issue 2 years ago • 2 comments

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 avatar Feb 15 '22 18:02 maasencioh

@targos @stropitek ?

maasencioh avatar Mar 07 '22 11:03 maasencioh

Please provide more information about your problem

  • What new way of adding types (what version breaks your types?)
  • Typescript playground that shows the problem

stropitek avatar Mar 07 '22 14:03 stropitek