Closed
Description
Using @zod/mini
version 4.0.0-beta.20250505T195954
, the the following code has incorrect type information for the check function:
const Thing = z.object({
name: z.string(),
age: z.number()
}).check(({ value, issues }) => {
});
type ThingOutput = z.infer<typeof Thing> // { name: string; age: number }
type ThingInput = z.input<typeof Thing> // { name: string; age: number }
With the previous beta, z.interface()
would give the correct type for value
.
Metadata
Metadata
Assignees
Labels
No labels