From 6f74da66624332e852e6ebffff3e1d944a6de907 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 7 Aug 2016 23:53:35 -0400 Subject: [PATCH] changed types of document.save() and remove() to this --- mongoose/mongoose.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mongoose/mongoose.d.ts b/mongoose/mongoose.d.ts index 430b3a2b0c..1c18bc67f5 100644 --- a/mongoose/mongoose.d.ts +++ b/mongoose/mongoose.d.ts @@ -2303,13 +2303,13 @@ declare module "mongoose" { * Returns another Model instance. * @param name model name */ - model(name: string): Model; + model(name: string): Model; /** * Removes this document from the db. * @param fn optional callback */ - remove(fn?: (err: any, product: T) => void): _MongoosePromise; + remove(fn?: (err: any, product: this) => void): _MongoosePromise; /** * Saves this document. @@ -2318,7 +2318,7 @@ declare module "mongoose" { * @param options.validateBeforeSave set to false to save without validating. * @param fn optional callback */ - save(fn?: (err: any, product: T, numAffected: number) => void): _MongoosePromise; + save(fn?: (err: any, product: this, numAffected: number) => void): _MongoosePromise; /** Base Mongoose instance the model uses. */ base: typeof mongoose;