File tree Expand file tree Collapse file tree 1 file changed +25
-26
lines changed Expand file tree Collapse file tree 1 file changed +25
-26
lines changed Original file line number Diff line number Diff line change 11type ValidatorMessages = {
2- base : string ;
3- required : string ;
4- enum : string ;
5- validate : string ;
6- unique : string ;
7- buffer : string ;
8- boolean : string ;
9- objectId : string ;
10- map : string ;
11- string : string ;
12- maxlength : string ;
13- minlength : string ;
14- regexp : string ;
15- number : string ;
16- 'number.max' : string ;
17- 'number.min' : string ;
18- date : string ;
19- 'date.max' : string ;
20- 'date.min' : string ;
2+ base ? : string ;
3+ required ? : string ;
4+ enum ? : string ;
5+ validate ? : string ;
6+ unique ? : string ;
7+ buffer ? : string ;
8+ boolean ? : string ;
9+ objectId ? : string ;
10+ map ? : string ;
11+ string ? : string ;
12+ maxlength ? : string ;
13+ minlength ? : string ;
14+ regexp ? : string ;
15+ number ? : string ;
16+ 'number.max' ? : string ;
17+ 'number.min' ? : string ;
18+ date ? : string ;
19+ 'date.max' ? : string ;
20+ 'date.min' ? : string ;
2121} ;
2222
2323type Paths = {
24- [ path : string ] : { origin : Boolean ; kind : string ; message : string } ;
24+ [ path : string ] : {
25+ origin ?: Boolean ;
26+ kind ?: string ;
27+ message ?: string ;
28+ } ;
2529} ;
2630
27- type Options = {
28- messages ?: ValidatorMessages ;
29- paths ?: Paths ;
30- } ;
31-
32- declare function mongooseValidationErrorHandler ( error : Error , options ?: Options ) : Error ;
31+ declare function mongooseValidationErrorHandler ( error : Error , options ?: { messages ?: ValidatorMessages , paths ?: Paths } ) : Error ;
3332declare namespace mongooseValidationErrorHandler { }
3433
3534export = mongooseValidationErrorHandler ;
You can’t perform that action at this time.
0 commit comments