Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are libraries that let you define refinement types[0] but it does require a bit of runtime overhead, and the added complexity depends on the library.

[0] https://zod.dev/?id=refine as an example



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: