moleculerjs / moleculer

:rocket: Progressive microservices framework for Node.js
https://moleculer.services/
MIT License
6.17k stars 587 forks source link

updates the Validators.Base.CheckerFunction typing to be more strict,… #1301

Closed fugufish closed 1 week ago

fugufish commented 2 months ago

… this potentially saves some debuggin hours when implementing a custom validator

:memo: Description

This fixes difficulties when writing a custom validator in typescript by strenghening the typings around the CheckerFunction. The stronger typing allows errors in how validators are implemented to be detected earlier.

:gem: Type of change

:vertical_traffic_light: How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

:checkered_flag: Checklist: