diff --git a/index.d.ts b/index.d.ts index cab7171cafb..ce9c30d7b4f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -665,14 +665,14 @@ declare module 'mongoose' { * Behaves like `remove()`, but deletes all documents that match `conditions` * regardless of the `single` option. */ - deleteMany(filter?: any, options?: QueryOptions, callback?: (err: CallbackError) => void): Query; + deleteMany(filter?: FilterQuery, options?: QueryOptions, callback?: (err: CallbackError) => void): Query; /** * Deletes the first document that matches `conditions` from the collection. * Behaves like `remove()`, but deletes at most one document regardless of the * `single` option. */ - deleteOne(filter?: any, options?: QueryOptions, callback?: (err: CallbackError) => void): Query; + deleteOne(filter?: FilterQuery, options?: QueryOptions, callback?: (err: CallbackError) => void): Query; /** * Sends `createIndex` commands to mongo for each index declared in the schema. @@ -841,13 +841,13 @@ declare module 'mongoose' { * @deprecated use `updateOne` or `updateMany` instead. * Creates a `update` query: updates one or many documents that match `filter` with `update`, based on the `multi` option. */ - update(filter?: FilterQuery, update?: UpdateQuery, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query; + update(filter?: FilterQuery, update?: UpdateQuery, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query; /** Creates a `updateMany` query: updates all documents that match `filter` with `update`. */ - updateMany(filter?: FilterQuery, update?: UpdateQuery, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query; + updateMany(filter?: FilterQuery, update?: UpdateQuery, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query; /** Creates a `updateOne` query: updates the first document that matches `filter` with `update`. */ - updateOne(filter?: FilterQuery, update?: UpdateQuery, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query; + updateOne(filter?: FilterQuery, update?: UpdateQuery, options?: QueryOptions | null, callback?: (err: any, res: any) => void): Query; /** Creates a Query, applies the passed conditions, and returns the Query. */ where(path: string, val?: any): Query, T>;