Skip to content

What's with the use of .passthrough() in zod? #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
punkpeye opened this issue Mar 11, 2025 · 1 comment
Open

What's with the use of .passthrough() in zod? #182

punkpeye opened this issue Mar 11, 2025 · 1 comment

Comments

@punkpeye
Copy link

Almost every Zod schema has .passthrough(), which feels very unusual.

Among other downsides, this breaks type safety by allowing arbitrary properties.

Just wondering what's the rationale for it?

@punkpeye
Copy link
Author

I am advocating to remove .passthrough() from all Zod shapes.

Happy to contribute a PR.

Among increasing type safety, this would also simplify types (see related issue #119)

Pizzaface pushed a commit to RewstApp/mcp-inspector that referenced this issue May 2, 2025
…1-sampling-dark-mode

fix: add dark mode support to SamplingTab JSON display (modelcontextprotocol#181)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant