Hi,
this code (similar to just plain safeParse) should infer the type of data if the validation is successful
import { partialSafeParse } from "zod_utilz";
import { z } from "zod";
const schema = z.object({
id: z.number()
})
const maybeValid = partialSafeParse(schema, { id: 1 });
if (maybeValid.success) {
console.log(maybeValid.data.id);
}
Instead the type inferred is unknown. The same happens to the ZodErrors type

Hi,
this code (similar to just plain safeParse) should infer the type of data if the validation is successful
Instead the type inferred is unknown. The same happens to the ZodErrors type