fabian-hiller / valibot

The modular and type safe schema library for validating structural data 🤖
https://valibot.dev
MIT License
6.33k stars 204 forks source link

improve type inference when using findItem with type predicates #868

Closed cberthou closed 2 weeks ago

cberthou commented 1 month ago

867

Not a big fan of duplicating FindItemAction to allow for a type with a predicate, but I didn't want to break retrocompatibility, nor create complex types that would degrade readability or maintenability.

fabian-hiller commented 1 month ago

It is ok to break things since we are not v1 yet. How would you implement it with breaking changes?

fabian-hiller commented 2 weeks ago

This is now implemented. I have added you as a co-author to my commit. Thank you for this PR!