seasonedcc / composable-functions

Types and functions to make composition easy and safe
MIT License
649 stars 13 forks source link

Accept plain functions in `applySchema` and deprecates `withSchema` #164

Closed gustavoguichard closed 1 month ago

gustavoguichard commented 1 month ago

With these changes I was able to replace every occurrence of withSchema with applySchema and the tests are passing. Now applySchema accepts plain functions and infers the types of the function's parameters.

I also deprecated withSchema and updated docs and examples to omit its usage.

This should solve #163

It also closes the latest remaining task of #155 =D