Skip to content

Commit

Permalink
Add missing optional props parameter in ValidateFn
Browse files Browse the repository at this point in the history
  • Loading branch information
Freezystem committed Oct 27, 2022
1 parent 3f0fb62 commit 3df419f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/validation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ declare module 'mongoose' {
}

interface ValidateFn<T> {
(value: T): boolean;
(value: T, props?: ValidatorProps & Record<string, any>): boolean;
}

interface LegacyAsyncValidateFn<T> {
(value: T, done: (result: boolean) => void): void;
}

interface AsyncValidateFn<T> {
(value: any): Promise<boolean>;
(value: T, props?: ValidatorProps & Record<string, any>): Promise<boolean>;
}

interface ValidateOpts<T> {
Expand Down

0 comments on commit 3df419f

Please sign in to comment.