3 ms·
> It irks me a lot that you can just do JSON.parse, declare any type on it and call it a day You should look at zod [0], which validates data with inferred typ
by davnicwil 4y ago
> It irks me a lot that you can just do JSON.parse, declare any type on it and call it a day
You should look at zod [0], which validates data with inferred types based on the validation having passed, so you do have the guarantee of the type being correct at runtime.
[0] https://zod.dev https://zod.dev