SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

0 0 0 JavaScript

[compiler] Update for Zod v3/v4 compatibility

Partial redo of #34710. The changes there tried to use `z.function(args, return)` to be compatible across Zod v3 and v4, but Zod 4's function API has completely changed. Instead, I've updated to just use `z.any()` where we expect a function, and manually validate that it's a function before we call the value. We already have validation of the return type (also using Zod).
K
kolvian committed
b1f39bae83b6cd4bc504b28bdcb1728eefd08618
Parent: 0eebd37
Committed by Joe Savona <joesavona@fb.com> on 10/3/2025, 4:50:36 PM