8000 V4: Recursive object throws `RangeError` when using `.shape` on it · Issue #4393 · colinhacks/zod · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
V4: Recursive object throws RangeError when using .shape on it #4393
Closed
@hibanka

Description

@hibanka

Zod version: zod@3.25.0-beta.20250517T081109

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 });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0