The Zod schema type.
The type of error to throw on invalid data.
The Zod schema to use in parsing.
The data to parse.
OptionalonError: ErrorType | ((zodError: ZodError) => void | ErrorType)A custom error to throw on invalid data (defaults to DataError). May either be the error itself, or a function that returns the error or nothing. If nothing is returned, the default error is thrown instead.
The parsed data from the Zod schema.
An alternative function to zodSchema.parse() that can be used to strictly parse Zod schemas.
NOTE: Use
parseZodSchemaAsyncif your schema includes an asynchronous function.