fastest-validator icon indicating copy to clipboard operation
fastest-validator copied to clipboard

Wrong typescript definition for ValidationSchema

Open koldoon opened this issue 1 year ago • 0 comments

Validation schema contains undefined | any definition for field which makes all thing pointless: it can not be checked statically and all modern IDE-s can't suggest options possible:

		/**
		 * List of validation rules for each defined field
		 */
		[key in keyof T]: ValidationRule | undefined | any;   // <--  !!! "undefined | any" must be removed to make d.ts really useful on practice

koldoon avatar Aug 21 '23 17:08 koldoon