Skip to content

Commit fadb450

Browse files
authored
Merge pull request #12874 from sffc/patch-1
Allow virtuals to be invoked in the definition of other virtuals
2 parents 6043907 + 5be82c3 commit fadb450

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ declare module 'mongoose' {
353353
statics: { [F in keyof TStaticMethods]: TStaticMethods[F] } & { [name: string]: (this: M, ...args: any[]) => any };
354354

355355
/** Creates a virtual type with the given name. */
356-
virtual<T = HydratedDocument<DocType, TInstanceMethods>>(
356+
virtual<T = HydratedDocument<DocType, TInstanceMethods, TVirtuals>>(
357357
name: keyof TVirtuals | string,
358358
options?: VirtualTypeOptions<T, DocType>
359359
): VirtualType<T>;

0 commit comments

Comments
 (0)