Closed cmdcarini closed 2 years ago
The change from #134 was reverted in 71b746e8e614f3abe9aea71a6beeed3d2a56e5b9, which was released in 3.1.0.
2nd attempt: https://github.com/AndrewKeig/express-validation/pull/157
The params for ValidationError
are slightly different from what you put above: It's new ValidationError({ body: [] }, {});
Should be fixed in 4.0.1 now.
The fix introduced in https://github.com/AndrewKeig/express-validation/pull/134 actually made our TS build pass. In versions before (and after) v3.0.7, our usage of the constructor ValidationError(message, details/req, original/res) fails as it isn't expecting parameters in the constructor (because one isn't defined by express-validation, but is in Joi).
Ex. of TS code that works in v3.0.7 but not in other versions
Any suggestions? For now we'll just stay on v3.0.7