Skip to content

Typescript does allow to use Evaluator Functions as Validators and vice versa #102

@IamSebastianDev

Description

@IamSebastianDev

Describe the bug

While demoing Flotsam, the following issue arose:

A Evaluator Function was used to validate a collection. Typescript did not show an error, as the function signatures are most likely the same. However, functionality wise, issues with validation success and error messaging arose. Validators can most likely be used to Evaluate values, too.

To Reproduce

  1. Create a collection & add Validation.
  2. Add a Evaluator as a Validator Function

Expected behaviour

Typescript should show an error, that a Evaluator can not be used as Validator function and vice versa.

Additional context

This is a typescript only issue.

Metadata

Metadata

Labels

bugSomething isn't workingtypescriptA bug or feature that only affects the library when using it with typescript

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions