Skip to content

Commit

Permalink
Merge pull request #12874 from sffc/patch-1
Browse files Browse the repository at this point in the history
Allow virtuals to be invoked in the definition of other virtuals
  • Loading branch information
vkarpov15 committed Jan 6, 2023
2 parents 6043907 + 5be82c3 commit fadb450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/index.d.ts
Expand Up @@ -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<T = HydratedDocument<DocType, TInstanceMethods>>(
virtual<T = HydratedDocument<DocType, TInstanceMethods, TVirtuals>>(
name: keyof TVirtuals | string,
options?: VirtualTypeOptions<T, DocType>
): VirtualType<T>;
Expand Down

0 comments on commit fadb450

Please sign in to comment.