Represents some filter operation for a given document schema.
If you want stricter type-checking and full auto-complete, see StrictFilter.
This is a more relaxed version of StrictFilter that doesn't type-check nested fields.
Optional
interface BasicSchema { arr: string[], num: number,}db.collection<BasicSchema>('coll_name').findOne({ $and: [ { _id: { $in: ['abc', 'def'] } }, { $not: { arr: { $size: 0 } } }, ]}); Copy
interface BasicSchema { arr: string[], num: number,}db.collection<BasicSchema>('coll_name').findOne({ $and: [ { _id: { $in: ['abc', 'def'] } }, { $not: { arr: { $size: 0 } } }, ]});
StrictFilter
Represents some filter operation for a given document schema.
If you want stricter type-checking and full auto-complete, see StrictFilter.
This is a more relaxed version of StrictFilter that doesn't type-check nested fields.