| 618 | } |
| 619 | |
| 620 | class String extends SchemaType { |
| 621 | /** This schema type's name, to defend against minifiers that mangle function names. */ |
| 622 | static schemaName: 'String'; |
| 623 | readonly schemaName: 'String'; |
| 624 | |
| 625 | /** Adds an enum validator */ |
| 626 | enum(vals: string[] | any): this; |
| 627 | |
| 628 | /** Adds a lowercase [setter](http://mongoosejs.com/docs/api/schematype.html#schematype_SchemaType-set). */ |
| 629 | lowercase(shouldApply?: boolean): this; |
| 630 | |
| 631 | /** Sets a regexp validator. */ |
| 632 | match(value: RegExp, message: string): this; |
| 633 | |
| 634 | /** Sets a maximum length validator. */ |
| 635 | maxlength(value: number, message: string): this; |
| 636 | |
| 637 | /** Sets a minimum length validator. */ |
| 638 | minlength(value: number, message: string): this; |
| 639 | |
| 640 | /** Adds a trim [setter](http://mongoosejs.com/docs/api/schematype.html#schematype_SchemaType-set). */ |
| 641 | trim(shouldTrim?: boolean): this; |
| 642 | |
| 643 | /** Adds an uppercase [setter](http://mongoosejs.com/docs/api/schematype.html#schematype_SchemaType-set). */ |
| 644 | uppercase(shouldApply?: boolean): this; |
| 645 | |
| 646 | /** Default options for this SchemaType */ |
| 647 | static defaultOptions: Record<string, any>; |
| 648 | } |
| 649 | |
| 650 | class Union extends SchemaType { |
| 651 | static schemaName: 'Union'; |
no outgoing calls
no test coverage detected
searching dependent graphs…