Skip to content

Commit

Permalink
Allow virtuals to be invoked in the definition of other virtuals
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Jan 5, 2023
1 parent e9b5eed commit 5be82c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
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 5be82c3

Please sign in to comment.