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;