Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

fugufish
Copy link
Contributor

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

📝 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.

💎 Type of change

  • New feature (non-breaking change which adds functionality)

🚦 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

  • Tested against a custome validator for Yup

🏁 Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

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

@icebob icebob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@icebob icebob merged commit 98e1ed6 into moleculerjs:next Nov 14, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants