2 ms·
You probably don’t want that throughout your entire codebase. It’s a lot of overhead. Where you do want it (at API/user input/network etc boundaries), you can u
by eyelidlessness 4y ago
You probably don’t want that throughout your entire codebase. It’s a lot of overhead. Where you do want it (at API/user input/network etc boundaries), you can use something like Zod[1] or similar to define your type guards and then infer the static types from there.
1: https://github.com/colinhacks/zod https://github.com/colinhacks/zod