From 5be82c32cc191de5260e136a3e58353b2c5c8fb9 Mon Sep 17 00:00:00 2001 From: "Shane F. Carr" Date: Wed, 4 Jan 2023 19:15:28 -0600 Subject: [PATCH] Allow virtuals to be invoked in the definition of other virtuals --- types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index 14a0e79feac..b4d348429bc 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -353,7 +353,7 @@ declare module 'mongoose' { statics: { [F in keyof TStaticMethods]: TStaticMethods[F] } & { [name: string]: (this: M, ...args: any[]) => any }; /** Creates a virtual type with the given name. */ - virtual>( + virtual>( name: keyof TVirtuals | string, options?: VirtualTypeOptions ): VirtualType;