From 393ada1ee2ef48a4bf99bac38dc11742bbd090d6 Mon Sep 17 00:00:00 2001 From: TonyYang Date: Mon, 7 Nov 2016 22:35:49 +0800 Subject: [PATCH] [@types/mongoose] Declare a right type for _id (#12462) * Declare a right type for _id * Delete the error definition --- mongoose/index.d.ts | 2 +- passport-local-mongoose/passport-local-mongoose-tests.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/mongoose/index.d.ts b/mongoose/index.d.ts index 150d94b2df..12c92571b5 100644 --- a/mongoose/index.d.ts +++ b/mongoose/index.d.ts @@ -871,7 +871,7 @@ declare module "mongoose" { /** Hash containing current validation errors. */ errors: Object; /** This documents _id. */ - _id: any; + _id: mongodb.ObjectID; /** Boolean flag specifying if the document is new. */ isNew: boolean; /** The documents schema. */ diff --git a/passport-local-mongoose/passport-local-mongoose-tests.ts b/passport-local-mongoose/passport-local-mongoose-tests.ts index 7b428561fe..21a928a8d7 100644 --- a/passport-local-mongoose/passport-local-mongoose-tests.ts +++ b/passport-local-mongoose/passport-local-mongoose-tests.ts @@ -23,7 +23,6 @@ import { Strategy as LocalStrategy } from 'passport-local'; //#region Test Models interface User extends PassportLocalDocument { - _id: string; username: string; hash: string; salt: string;