From 36384e7fc360b62c9d9d3cb3b65c6b01fe2682f8 Mon Sep 17 00:00:00 2001 From: Jan Prieser Date: Wed, 6 Dec 2023 21:54:40 +0100 Subject: [PATCH] add missing Type for applyDefaults --- types/models.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/models.d.ts b/types/models.d.ts index 5a438b61d57..2690c4ec3ab 100644 --- a/types/models.d.ts +++ b/types/models.d.ts @@ -183,6 +183,9 @@ declare module 'mongoose' { /* Cast the given POJO to the model's schema */ castObject(obj: AnyObject, options?: { ignoreCastErrors?: boolean }): TRawDocType; + /* Apply defaults to the given document or POJO. */ + applyDefaults(obj: AnyObject|TRawDocType): TRawDocType; + /** * Sends multiple `insertOne`, `updateOne`, `updateMany`, `replaceOne`, * `deleteOne`, and/or `deleteMany` operations to the MongoDB server in one