You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can think of two possible solutions here. First is to make the parsed result a normal function instead of an arrow function, then apply its this to the underlying fn. The second is to use proxies on either the parsed function, the parsed object, or both to get a similar behavior.
I'll have a not-yet-mergeable PR for the former strategy up for this shortly. Would love help getting it over the line.
The text was updated successfully, but these errors were encountered:
Quoting myself from discord:
The problem is that the parsed object's parsed method is an arrow function, and thus has a "this" of the ZodFunction (see:
zod/src/types.ts
Line 3755 in 1ecd624
I can think of two possible solutions here. First is to make the parsed result a normal function instead of an arrow function, then apply its
this
to the underlyingfn
. The second is to use proxies on either the parsed function, the parsed object, or both to get a similar behavior.I'll have a not-yet-mergeable PR for the former strategy up for this shortly. Would love help getting it over the line.
The text was updated successfully, but these errors were encountered: