diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index bb1a64be4f..1e056afd1c 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Mongoose 5.5 +// Type definitions for Mongoose 5.5.1 // Project: http://mongoosejs.com/ // Definitions by: horiuchi // lukasz-zak @@ -1968,6 +1968,9 @@ declare module "mongoose" { /** Specifies the maxScan option. Cannot be used with distinct() */ maxScan(val: number): this; + /** Specifies the maxTimeMS options. */ + maxTimeMS(val: number): this; + /** * Merges another Query or conditions object into this one. * When a Query is passed, conditions, field selection and options are merged. diff --git a/types/mongoose/mongoose-tests.ts b/types/mongoose/mongoose-tests.ts index 799ec3cfc9..55faba9f88 100644 --- a/types/mongoose/mongoose-tests.ts +++ b/types/mongoose/mongoose-tests.ts @@ -1083,6 +1083,7 @@ query.find().lt('age', 21); query.find().where('age').lte(21); query.find().lte('age', 21); query.maxDistance('path', 21).maxDistance(21); +query.maxTimeMS(1000); query.maxscan(100).maxScan(100); query.maxScan(100).maxScan(100); query.merge(query).merge({});