Closed codetheweb closed 8 months ago
If your route spec is:
withRouteSpec({ queryParams: z.object({ filter: z.string().transform(s => s.split(",")) }) })
edgespec will write the type as
{ queryParams: { filter: string[] } }
instead of the correct
{ queryParams: { filter: string } }
Zod provides z.input<typeof schema> for this use case when using types. There's also a _input property available on schemas that seems to be the same thing as a value.
z.input<typeof schema>
_input
If your route spec is:
edgespec will write the type as
instead of the correct
Zod provides
z.input<typeof schema>
for this use case when using types. There's also a_input
property available on schemas that seems to be the same thing as a value.