Skip to content

Conversation

@decs
Copy link
Contributor

@decs decs commented Jul 5, 2023

I launched TypeSchema to help library developers like me (and product developers as well) decouple their code from specific validation libraries (like zod or yup) and make them more plug-n-play

decs added 2 commits July 5, 2023 11:44
I launched TypeSchema to help library developers like me (and product developers as well) decouple their code from specific validation libraries (like `zod` or `yup`) and make them more plug-n-play
@akutruff
Copy link
Owner

akutruff commented Jul 6, 2023

Thanks for submitting a PR. I'm trying to understand what this library does but the docs are not clear. Would you please clarify it for me?

@decs
Copy link
Contributor Author

decs commented Jul 6, 2023

Hey, Andy!

There's no clear winner validation lib because there's always a tradeoff. So people choose the solution that makes most sense to them (out of the many existing ones).

For library owners who need some sort of runtime validation, they have the choice of either to:

  1. ⁠Implement their own validation logic: which is more code to maintain, and there are many good solutions already out there (zod, arktype, typia, etc)
  2. ⁠Couple their code with a specific validation lib: which limits adoption
  3. ⁠Support multiple validation libs: which can be a burden to maintain (tRPC picked this one)

This package solves the problem by providing #3 out-of-the-box. It's a common adapter for all schema libs (and meant to be used in conjunction with a schema lib). So it's a different category from the previous projects listed. I wasn't sure on how to name it in a clear way, so feel free to suggest a good category name.

@decs
Copy link
Contributor Author

decs commented Jul 6, 2023

And thanks for the feedback! 😃 I updated the readme to add more context and details on how to use

@akutruff akutruff merged commit 3163b2c into akutruff:main Jul 6, 2023
@akutruff
Copy link
Owner

akutruff commented Jul 6, 2023

Sweet. Thanks for explaining.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants