Function: instanceof()
instanceof<
T>(cls,params?):ZodCustom<InstanceType<T>,InstanceType<T>>
Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:747
Type Parameters
T
T extends typeof Class
Parameters
cls
T
params?
error?
string | $ZodErrorMap<$ZodIssueCustom>
message?
string
Deprecated
This parameter is deprecated. Use error instead.
when?
(payload) => boolean
If provided, the check runs only when this returns true. By default, it is skipped if prior parsing produced aborting issues.
Returns
ZodCustom<InstanceType<T>, InstanceType<T>>