5 ms·
You'd still be able to execute the code as JS. Your library that uses type reflection wouldn't work anymore but that's true of all these solutions.
by wvenable 3y ago
You'd still be able to execute the code as JS. Your library that uses type reflection wouldn't work anymore but that's true of all these solutions.
- lolinder 3y agoNo, it's not. I can take a library that uses zod, strip the annotations, and it will execute perfectly anywhere I want to run it.
- wvenable 3y agoThat's because Zod doesn't use type annotations as input. We're talking about wanting to use type annotations as input so that we don't have to make our code as ugly as Zod makes it.