This val shows how to break up your HTTP val into three vals:
I have these vals in a folder. Unfortunately, folders are not publicly shareable,
which is why I listed all the vals above. The Val Town full-screen editor makes it
a lot easier to work with multiple vals at once.
The trickiest and most interesting part of this particular demo is how we import just the zod type
in the frontend which avoids the error
if we were to import any real value from that shared file. In this sense, it's not a truly safe
shared file.
- I don't know why zod types aren't working when imported via esm.sh
- I don't know how we would get zod validation working on the frontend without reimporting zod from esm.sh (which would then lose us types or require us to duplicate the zod code)