T
tRPC

zod input validation from ts type

zod input validation from ts type

Iintiserx4/26/2023
I imported a type using import type { WebhookEvent } from "@clerk/nextjs/api";. Is there a way to use the type to validate the input with zod for a procedure?
createUser: publicProcedure .input(something here to use WebhookEvent with z.object)
createUser: publicProcedure .input(something here to use WebhookEvent with z.object)

Looking for more? Join the community!

T
tRPC

zod input validation from ts type

Join Server