decs / typeschema

🛵 Universal adapter for TypeScript schema validation.
https://typeschema.com
MIT License
402 stars 13 forks source link

Make `validate` function synchronous if possible #56

Open nicolasperez19 opened 6 months ago

nicolasperez19 commented 6 months ago

Making the parsing synchronous would make it easier to integrate with other tools like t3Env

Upvote & Fund

Fund with Polar

harshtalks commented 5 months ago

any updates on this?

itsyoboieltr commented 2 weeks ago

I have this issue too. React Native does not support top-level await. This means I cannot use validate and assert in my modules, as they are async. I would recommend that we also provide synchronous counterparts for these functions.