diff --git a/types/document.d.ts b/types/document.d.ts index 2bb82e3c67..c0723e883b 100644 --- a/types/document.d.ts +++ b/types/document.d.ts @@ -16,7 +16,7 @@ declare module 'mongoose' { * * TQueryHelpers - Object with any helpers that should be mixed into the Query type * * DocType - the type of the actual Document created */ - class Document { + class Document { constructor(doc?: any); /** This documents _id. */ diff --git a/types/types.d.ts b/types/types.d.ts index f63b193490..08f90c6184 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -83,7 +83,7 @@ declare module 'mongoose' { class ObjectId extends mongodb.ObjectId { } - class Subdocument extends Document { + class Subdocument extends Document { $isSingleNested: true; /** Returns the top level document of this sub-document. */