zod
zod copied to clipboard
V4: Recursive object throws `RangeError` when using `.shape` on it
Zod version: [email protected]
import { z } from 'zod/v4';
const Transfer = z.object({
id: z.string(),
get counterpartyId() {
return Transfer.shape.id;
},
});
// RangeError: Maximum call stack size exceeded
const hello = z.object({ id: Transfer.shape.id });