From 77d2c70c06a94b9084f040ade29e99f1269756c5 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Mon, 1 Aug 2022 11:21:50 -0400 Subject: [PATCH] perf(types): make `$assertPopulated()` not use `this`, because `Omit` causes perf issues Re: #10349 --- types/document.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/document.d.ts b/types/document.d.ts index 44c74022141..703d54b885d 100644 --- a/types/document.d.ts +++ b/types/document.d.ts @@ -26,7 +26,7 @@ declare module 'mongoose' { __v?: any; /** Assert that a given path or paths is populated. Throws an error if not populated. */ - $assertPopulated(paths: string | string[]): Omit & Paths; + $assertPopulated(paths: string | string[]): Omit & Paths; /* Get all subdocs (by bfs) */ $getAllSubdocs(): Document[];